1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-14 16:51:08 +01:00

Add a "disabled" style

Summary: Fixes T3525. This feels way better, although it's still a little hard for me to pick out of lists with otherwise default-colored items.

Test Plan: {F49910} {F49911}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3525

Differential Revision: https://secure.phabricator.com/D6435
This commit is contained in:
epriestley 2013-07-12 11:31:20 -07:00
parent a9690a81c6
commit b6df427c2f
7 changed files with 93 additions and 46 deletions

View file

@ -3334,7 +3334,7 @@ celerity_register_resource_map(array(
),
'phabricator-object-item-list-view-css' =>
array(
'uri' => '/res/fa3c7eb1/rsrc/css/layout/phabricator-object-item-list-view.css',
'uri' => '/res/a3e45d8a/rsrc/css/layout/phabricator-object-item-list-view.css',
'type' => 'css',
'requires' =>
array(
@ -4149,7 +4149,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'6e2d527c' =>
'c01cebae' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@ -4197,7 +4197,7 @@ celerity_register_resource_map(array(
40 => 'phabricator-property-list-view-css',
41 => 'phabricator-tag-view-css',
),
'uri' => '/res/pkg/6e2d527c/core.pkg.css',
'uri' => '/res/pkg/c01cebae/core.pkg.css',
'type' => 'css',
),
'75ccea43' =>
@ -4391,16 +4391,16 @@ celerity_register_resource_map(array(
'reverse' =>
array(
'aphront-attached-file-view-css' => 'adc3c36d',
'aphront-dialog-view-css' => '6e2d527c',
'aphront-error-view-css' => '6e2d527c',
'aphront-form-view-css' => '6e2d527c',
'aphront-list-filter-view-css' => '6e2d527c',
'aphront-pager-view-css' => '6e2d527c',
'aphront-panel-view-css' => '6e2d527c',
'aphront-table-view-css' => '6e2d527c',
'aphront-tokenizer-control-css' => '6e2d527c',
'aphront-tooltip-css' => '6e2d527c',
'aphront-typeahead-control-css' => '6e2d527c',
'aphront-dialog-view-css' => 'c01cebae',
'aphront-error-view-css' => 'c01cebae',
'aphront-form-view-css' => 'c01cebae',
'aphront-list-filter-view-css' => 'c01cebae',
'aphront-pager-view-css' => 'c01cebae',
'aphront-panel-view-css' => 'c01cebae',
'aphront-table-view-css' => 'c01cebae',
'aphront-tokenizer-control-css' => 'c01cebae',
'aphront-tooltip-css' => 'c01cebae',
'aphront-typeahead-control-css' => 'c01cebae',
'differential-changeset-view-css' => 'dd27a69b',
'differential-core-view-css' => 'dd27a69b',
'differential-inline-comment-editor' => '504ca7d2',
@ -4414,7 +4414,7 @@ celerity_register_resource_map(array(
'differential-table-of-contents-css' => 'dd27a69b',
'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88',
'global-drag-and-drop-css' => '6e2d527c',
'global-drag-and-drop-css' => 'c01cebae',
'inline-comment-summary-css' => 'dd27a69b',
'javelin-aphlict' => '75ccea43',
'javelin-behavior' => 'a9f14d76',
@ -4488,55 +4488,55 @@ celerity_register_resource_map(array(
'javelin-util' => 'a9f14d76',
'javelin-vector' => 'a9f14d76',
'javelin-workflow' => 'a9f14d76',
'lightbox-attachment-css' => '6e2d527c',
'lightbox-attachment-css' => 'c01cebae',
'maniphest-task-summary-css' => 'adc3c36d',
'maniphest-transaction-detail-css' => 'adc3c36d',
'phabricator-action-list-view-css' => '6e2d527c',
'phabricator-application-launch-view-css' => '6e2d527c',
'phabricator-action-list-view-css' => 'c01cebae',
'phabricator-application-launch-view-css' => 'c01cebae',
'phabricator-busy' => '75ccea43',
'phabricator-content-source-view-css' => 'dd27a69b',
'phabricator-core-css' => '6e2d527c',
'phabricator-crumbs-view-css' => '6e2d527c',
'phabricator-core-css' => 'c01cebae',
'phabricator-crumbs-view-css' => 'c01cebae',
'phabricator-drag-and-drop-file-upload' => '504ca7d2',
'phabricator-dropdown-menu' => '75ccea43',
'phabricator-file-upload' => '75ccea43',
'phabricator-filetree-view-css' => '6e2d527c',
'phabricator-flag-css' => '6e2d527c',
'phabricator-form-view-css' => '6e2d527c',
'phabricator-header-view-css' => '6e2d527c',
'phabricator-filetree-view-css' => 'c01cebae',
'phabricator-flag-css' => 'c01cebae',
'phabricator-form-view-css' => 'c01cebae',
'phabricator-header-view-css' => 'c01cebae',
'phabricator-hovercard' => '75ccea43',
'phabricator-jump-nav' => '6e2d527c',
'phabricator-jump-nav' => 'c01cebae',
'phabricator-keyboard-shortcut' => '75ccea43',
'phabricator-keyboard-shortcut-manager' => '75ccea43',
'phabricator-main-menu-view' => '6e2d527c',
'phabricator-main-menu-view' => 'c01cebae',
'phabricator-menu-item' => '75ccea43',
'phabricator-nav-view-css' => '6e2d527c',
'phabricator-nav-view-css' => 'c01cebae',
'phabricator-notification' => '75ccea43',
'phabricator-notification-css' => '6e2d527c',
'phabricator-notification-menu-css' => '6e2d527c',
'phabricator-object-item-list-view-css' => '6e2d527c',
'phabricator-notification-css' => 'c01cebae',
'phabricator-notification-menu-css' => 'c01cebae',
'phabricator-object-item-list-view-css' => 'c01cebae',
'phabricator-object-selector-css' => 'dd27a69b',
'phabricator-phtize' => '75ccea43',
'phabricator-prefab' => '75ccea43',
'phabricator-project-tag-css' => 'adc3c36d',
'phabricator-property-list-view-css' => '6e2d527c',
'phabricator-remarkup-css' => '6e2d527c',
'phabricator-property-list-view-css' => 'c01cebae',
'phabricator-remarkup-css' => 'c01cebae',
'phabricator-shaped-request' => '504ca7d2',
'phabricator-side-menu-view-css' => '6e2d527c',
'phabricator-standard-page-view' => '6e2d527c',
'phabricator-tag-view-css' => '6e2d527c',
'phabricator-side-menu-view-css' => 'c01cebae',
'phabricator-standard-page-view' => 'c01cebae',
'phabricator-tag-view-css' => 'c01cebae',
'phabricator-textareautils' => '75ccea43',
'phabricator-tooltip' => '75ccea43',
'phabricator-transaction-view-css' => '6e2d527c',
'phabricator-zindex-css' => '6e2d527c',
'phui-button-css' => '6e2d527c',
'phui-form-css' => '6e2d527c',
'phui-icon-view-css' => '6e2d527c',
'phui-spacing-css' => '6e2d527c',
'sprite-apps-large-css' => '6e2d527c',
'sprite-gradient-css' => '6e2d527c',
'sprite-icons-css' => '6e2d527c',
'sprite-menu-css' => '6e2d527c',
'syntax-highlighting-css' => '6e2d527c',
'phabricator-transaction-view-css' => 'c01cebae',
'phabricator-zindex-css' => 'c01cebae',
'phui-button-css' => 'c01cebae',
'phui-form-css' => 'c01cebae',
'phui-icon-view-css' => 'c01cebae',
'phui-spacing-css' => 'c01cebae',
'sprite-apps-large-css' => 'c01cebae',
'sprite-gradient-css' => 'c01cebae',
'sprite-icons-css' => 'c01cebae',
'sprite-menu-css' => 'c01cebae',
'syntax-highlighting-css' => 'c01cebae',
),
));

View file

@ -68,6 +68,7 @@ final class PhabricatorConfigIssueListController
$list->addItem($item);
} else {
$item->addIcon('none', pht('Ignored'));
$item->setDisabled(true);
$item->addAction(
id(new PHUIListItemView())
->setIcon('preview')

View file

@ -262,10 +262,10 @@ final class PhabricatorApplicationSearchController
if ($named_query->getIsBuiltin()) {
if ($named_query->getIsDisabled()) {
$item->addIcon('delete-grey', pht('Disabled'));
$item->setDisabled(true);
} else {
$item->addIcon('lock-grey', pht('Builtin'));
}
$item->setBarColor('grey');
} else {
$item->addAction(
id(new PHUIListItemView())

View file

@ -172,6 +172,7 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample {
->addAction(
id(new PHUIListItemView())
->setHref('#')
->setName(pht('Moo'))
->setIcon('edit')));
$list->addItem(
@ -182,10 +183,12 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample {
->addAction(
id(new PHUIListItemView())
->setHref('#')
->setName(pht('Quack'))
->setIcon('edit'))
->addAction(
id(new PHUIListItemView())
->setHref('#')
->setName(pht('Oink'))
->setIcon('delete')));
$out[] = array($head, $list);
@ -243,21 +246,31 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample {
$list->addItem(
id(new PhabricatorObjectItemView())
->setObjectName('X1')
->setHeader(pht('Normal'))
->setHref('#'));
$list->addItem(
id(new PhabricatorObjectItemView())
->setObjectName('X2')
->setHeader(pht('Highlighted'))
->setEffect('highlighted')
->setHref('#'));
$list->addItem(
id(new PhabricatorObjectItemView())
->setObjectName('X3')
->setHeader(pht('Selected'))
->setEffect('selected')
->setHref('#'));
$list->addItem(
id(new PhabricatorObjectItemView())
->setObjectName('X4')
->setHeader(pht('Disabled'))
->setDisabled(true)
->setHref('#'));
$out[] = array($head, $list);

View file

@ -73,6 +73,7 @@ final class PhabricatorCustomFieldConfigOptionType
}
$disabled_item->addIcon('none', pht('Disabled'));
$disabled_item->setDisabled(true);
$disabled_item->addAction(
id(new PHUIListItemView())
->setHref('#')

View file

@ -17,6 +17,16 @@ final class PhabricatorObjectItemView extends AphrontTagView {
private $grippable;
private $actions = array();
private $headIcons = array();
private $disabled;
public function setDisabled($disabled) {
$this->disabled = $disabled;
return $this;
}
public function getDisabled() {
return $this->disabled;
}
public function addHeadIcon($icon) {
$this->headIcons[] = $icon;
@ -172,6 +182,10 @@ final class PhabricatorObjectItemView extends AphrontTagView {
$item_classes[] = 'phabricator-object-item-with-'.$n.'-actions';
}
if ($this->disabled) {
$item_classes[] = 'phabricator-object-item-disabled';
}
switch ($this->effect) {
case 'highlighted':
$item_classes[] = 'phabricator-object-item-highlighted';

View file

@ -358,6 +358,24 @@
border-left-color: #333333;
}
/* - Disabled ------------------------------------------------------------------
Disabled/inactive objects.
*/
.phabricator-object-item-disabled {
border-left-color: #d7d7d7;
}
.phabricator-object-item-disabled .phabricator-object-item-frame {
border-color: #d7d7d7;
}
.phabricator-object-item-disabled .phabricator-object-item-objname {
color: #777777;
}
/* - Effects -------------------------------------------------------------------