Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15338404
D16418.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Referenced Files
None
Subscribers
None
D16418.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => '3cea8606',
+ 'core.pkg.css' => 'ba6d7e7a',
'core.pkg.js' => 'b562c3db',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '3fb7f532',
@@ -147,7 +147,7 @@
'rsrc/css/phui/phui-info-view.css' => '28efab79',
'rsrc/css/phui/phui-list.css' => '9da2aa00',
'rsrc/css/phui/phui-object-box.css' => '6b487c57',
- 'rsrc/css/phui/phui-object-item-list-view.css' => '8d99e42b',
+ 'rsrc/css/phui/phui-object-item-list-view.css' => 'aefe157c',
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
'rsrc/css/phui/phui-profile-menu.css' => '8a3fc181',
@@ -856,7 +856,7 @@
'phui-inline-comment-view-css' => '5953c28e',
'phui-list-view-css' => '9da2aa00',
'phui-object-box-css' => '6b487c57',
- 'phui-object-item-list-view-css' => '8d99e42b',
+ 'phui-object-item-list-view-css' => 'aefe157c',
'phui-pager-css' => 'bea33d23',
'phui-pinboard-view-css' => '2495140e',
'phui-profile-menu-css' => '8a3fc181',
diff --git a/src/applications/auth/controller/config/PhabricatorAuthListController.php b/src/applications/auth/controller/config/PhabricatorAuthListController.php
--- a/src/applications/auth/controller/config/PhabricatorAuthListController.php
+++ b/src/applications/auth/controller/config/PhabricatorAuthListController.php
@@ -53,7 +53,7 @@
}
if ($config->getIsEnabled()) {
- $item->setState(PHUIObjectItemView::STATE_SUCCESS);
+ $item->setStatusIcon('fa-check-circle green');
$item->addAction(
id(new PHUIListItemView())
->setIcon('fa-times')
@@ -61,8 +61,8 @@
->setDisabled(!$can_manage)
->addSigil('workflow'));
} else {
- $item->setState(PHUIObjectItemView::STATE_FAIL);
- $item->addIcon('fa-times grey', pht('Disabled'));
+ $item->setStatusIcon('fa-ban red');
+ $item->addIcon('fa-ban grey', pht('Disabled'));
$item->addAction(
id(new PHUIListItemView())
->setIcon('fa-plus')
diff --git a/src/applications/uiexample/examples/PHUIObjectItemListExample.php b/src/applications/uiexample/examples/PHUIObjectItemListExample.php
--- a/src/applications/uiexample/examples/PHUIObjectItemListExample.php
+++ b/src/applications/uiexample/examples/PHUIObjectItemListExample.php
@@ -340,55 +340,6 @@
$out[] = $box;
- $list = id(new PHUIObjectItemListView())
- ->setStates(true);
-
- $list->addItem(
- id(new PHUIObjectItemView())
- ->setObjectName('X1200')
- ->setHeader(pht('Action Passed'))
- ->addAttribute(pht('That went swimmingly, go you'))
- ->setHref('#')
- ->setState(PHUIObjectItemView::STATE_SUCCESS));
-
- $list->addItem(
- id(new PHUIObjectItemView())
- ->setObjectName('X1201')
- ->setHeader(pht('Action Failed'))
- ->addAttribute(pht('Whoopsies, might want to fix that'))
- ->setHref('#')
- ->setState(PHUIObjectItemView::STATE_FAIL));
-
- $list->addItem(
- id(new PHUIObjectItemView())
- ->setObjectName('X1202')
- ->setHeader(pht('Action Warning'))
- ->addAttribute(pht('We need to talk about things'))
- ->setHref('#')
- ->setState(PHUIObjectItemView::STATE_WARN));
-
- $list->addItem(
- id(new PHUIObjectItemView())
- ->setObjectName('X1203')
- ->setHeader(pht('Action Noted'))
- ->addAttribute(pht('The weather seems nice today'))
- ->setHref('#')
- ->setState(PHUIObjectItemView::STATE_NOTE));
-
- $list->addItem(
- id(new PHUIObjectItemView())
- ->setObjectName('X1203')
- ->setHeader(pht('Action In Progress'))
- ->addAttribute(pht('Outlook fuzzy, try again later'))
- ->setHref('#')
- ->setState(PHUIObjectItemView::STATE_BUILD));
-
- $box = id(new PHUIObjectBoxView())
- ->setHeaderText(pht('State Icons'))
- ->setObjectList($list);
-
- $out[] = array($box);
-
return $out;
}
}
diff --git a/src/view/phui/PHUIObjectItemListView.php b/src/view/phui/PHUIObjectItemListView.php
--- a/src/view/phui/PHUIObjectItemListView.php
+++ b/src/view/phui/PHUIObjectItemListView.php
@@ -9,7 +9,6 @@
private $flush;
private $simple;
private $allowEmptyList;
- private $states;
private $itemClass = 'phui-object-item-standard';
public function setAllowEmptyList($allow_empty_list) {
@@ -51,11 +50,6 @@
return $this;
}
- public function setStates($states) {
- $this->states = $states;
- return $this;
- }
-
public function setItemClass($item_class) {
$this->itemClass = $item_class;
return $this;
@@ -69,9 +63,6 @@
$classes = array();
$classes[] = 'phui-object-item-list-view';
- if ($this->states) {
- $classes[] = 'phui-object-list-states';
- }
if ($this->flush) {
$classes[] = 'phui-object-list-flush';
}
diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php
--- a/src/view/phui/PHUIObjectItemView.php
+++ b/src/view/phui/PHUIObjectItemView.php
@@ -19,8 +19,6 @@
private $headIcons = array();
private $disabled;
private $imageURI;
- private $state;
- private $fontIcon;
private $imageIcon;
private $titleText;
private $badge;
@@ -29,16 +27,6 @@
private $launchButton;
private $coverImage;
- const AGE_FRESH = 'fresh';
- const AGE_STALE = 'stale';
- const AGE_OLD = 'old';
-
- const STATE_SUCCESS = 'green';
- const STATE_FAIL = 'red';
- const STATE_WARN = 'yellow';
- const STATE_NOTE = 'blue';
- const STATE_BUILD = 'sky';
-
public function setDisabled($disabled) {
$this->disabled = $disabled;
return $this;
@@ -156,63 +144,9 @@
return $this;
}
- public function setState($state) {
- $this->state = $state;
- switch ($state) {
- case self::STATE_SUCCESS:
- $fi = 'fa-check-circle green';
- break;
- case self::STATE_FAIL:
- $fi = 'fa-times-circle red';
- break;
- case self::STATE_WARN:
- $fi = 'fa-exclamation-circle yellow';
- break;
- case self::STATE_NOTE:
- $fi = 'fa-info-circle blue';
- break;
- case self::STATE_BUILD:
- $fi = 'fa-refresh ph-spin sky';
- break;
- }
- $this->setIcon($fi);
- return $this;
- }
-
- public function setIcon($icon) {
- $this->fontIcon = id(new PHUIIconView())
- ->setIcon($icon);
- return $this;
- }
-
- public function setEpoch($epoch, $age = self::AGE_FRESH) {
+ public function setEpoch($epoch) {
$date = phabricator_datetime($epoch, $this->getUser());
-
- $days = floor((time() - $epoch) / 60 / 60 / 24);
-
- switch ($age) {
- case self::AGE_FRESH:
- $this->addIcon('none', $date);
- break;
- case self::AGE_STALE:
- $attr = array(
- 'tip' => pht('Stale (%s day(s))', new PhutilNumber($days)),
- 'class' => 'icon-age-stale',
- );
-
- $this->addIcon('fa-clock-o yellow', $date, $attr);
- break;
- case self::AGE_OLD:
- $attr = array(
- 'tip' => pht('Old (%s day(s))', new PhutilNumber($days)),
- 'class' => 'icon-age-old',
- );
- $this->addIcon('fa-clock-o red', $date, $attr);
- break;
- default:
- throw new Exception(pht("Unknown age '%s'!", $age));
- }
-
+ $this->addIcon('none', $date);
return $this;
}
@@ -309,10 +243,6 @@
$item_classes[] = 'phui-object-item-disabled';
}
- if ($this->state) {
- $item_classes[] = 'phui-object-item-state-'.$this->state;
- }
-
switch ($this->effect) {
case 'highlighted':
$item_classes[] = 'phui-object-item-highlighted';
@@ -338,10 +268,6 @@
$item_classes[] = 'phui-object-item-with-image-icon';
}
- if ($this->fontIcon) {
- $item_classes[] = 'phui-object-item-with-ficon';
- }
-
return array(
'class' => $item_classes,
);
@@ -596,16 +522,6 @@
$this->getImageIcon());
}
- $ficon = null;
- if ($this->fontIcon) {
- $image = phutil_tag(
- 'div',
- array(
- 'class' => 'phui-object-item-ficon',
- ),
- $this->fontIcon);
- }
-
if ($image && $this->href) {
$image = phutil_tag(
'a',
diff --git a/webroot/rsrc/css/phui/phui-object-item-list-view.css b/webroot/rsrc/css/phui/phui-object-item-list-view.css
--- a/webroot/rsrc/css/phui/phui-object-item-list-view.css
+++ b/webroot/rsrc/css/phui/phui-object-item-list-view.css
@@ -487,46 +487,6 @@
}
-/* - Foot Icons ----------------------------------------------------------------
-
- Object counts shown in the footer.
-
-*/
-
-.phui-object-item-foot-icons {
- margin-left: 10px;
- bottom: 0;
- position: absolute;
-}
-
-.phui-object-item-with-foot-icons .phui-object-item-content,
-.device-phone .phui-object-item-with-foot-icons .phui-object-item-col2 {
- padding-bottom: 24px;
-}
-
-.device-phone .phui-object-item-with-foot-icons .phui-object-item-content {
- padding-bottom: 0;
-}
-
-.phui-object-item-foot-icon {
- display: inline-block;
- background: {$lightgreyborder};
- color: #ffffff;
- font-weight: bold;
- margin-right: 3px;
- padding: 3px 6px 0;
- height: 17px;
- vertical-align: middle;
- position: relative;
- font-size: 12px;
- -webkit-font-smoothing: antialiased;
-}
-
-.phui-object-item-foot-icon .phui-icon-view {
- margin-right: 4px;
-}
-
-
/* - Handle Icons --------------------------------------------------------------
Shows owners, reviewers, etc., using profile picture icons.
@@ -621,35 +581,6 @@
list-style: none;
}
-
-/* - State ---------------------------------------------------------------------
-
- Provides a list of object status or states, success or fail, etc
-
-*/
-
-.phui-object-item-ficon {
- width: 48px;
- height: 26px;
- margin-top: 12px;
- position: absolute;
- text-align: center;
- font-size: 24px;
-}
-
-.phui-object-item-with-ficon .phui-object-item-content-box {
- margin-left: 38px;
-}
-
-.phui-object-box .phui-object-list-states {
- padding: 0;
-}
-
-.phui-object-list-states .phui-info-view {
- margin: 0;
- border: none;
-}
-
/* - Badges ---------------------------------------------------------------- */
.phui-object-item-col0.phui-object-item-badge {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 10:50 AM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7430574
Default Alt Text
D16418.diff (10 KB)
Attached To
Mode
D16418: Simplify PHUIObjectItemList a bit
Attached
Detach File
Event Timeline
Log In to Comment