1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Give disabled crumb actions a distinct visual style

Summary: Ref T603. When you aren't allowed to take a top-level action (usually "Create Thing"), visually disable the action.

Test Plan: {F69596}

Reviewers: chad

Reviewed By: chad

CC: chad, aran, asherkin

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7318
This commit is contained in:
epriestley 2013-10-14 18:21:06 -07:00
parent 76dfeb95ba
commit 197d3817bc
3 changed files with 61 additions and 47 deletions

View file

@ -3145,7 +3145,7 @@ celerity_register_resource_map(array(
),
'phabricator-crumbs-view-css' =>
array(
'uri' => '/res/4d722e16/rsrc/css/layout/phabricator-crumbs-view.css',
'uri' => '/res/f3c7068b/rsrc/css/layout/phabricator-crumbs-view.css',
'type' => 'css',
'requires' =>
array(
@ -4272,7 +4272,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'0ed58ed4' =>
'ad23f226' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@ -4321,7 +4321,7 @@ celerity_register_resource_map(array(
41 => 'phabricator-tag-view-css',
42 => 'phui-list-view-css',
),
'uri' => '/res/pkg/0ed58ed4/core.pkg.css',
'uri' => '/res/pkg/ad23f226/core.pkg.css',
'type' => 'css',
),
'adee86d9' =>
@ -4513,15 +4513,15 @@ celerity_register_resource_map(array(
),
'reverse' =>
array(
'aphront-dialog-view-css' => '0ed58ed4',
'aphront-error-view-css' => '0ed58ed4',
'aphront-list-filter-view-css' => '0ed58ed4',
'aphront-pager-view-css' => '0ed58ed4',
'aphront-panel-view-css' => '0ed58ed4',
'aphront-table-view-css' => '0ed58ed4',
'aphront-tokenizer-control-css' => '0ed58ed4',
'aphront-tooltip-css' => '0ed58ed4',
'aphront-typeahead-control-css' => '0ed58ed4',
'aphront-dialog-view-css' => 'ad23f226',
'aphront-error-view-css' => 'ad23f226',
'aphront-list-filter-view-css' => 'ad23f226',
'aphront-pager-view-css' => 'ad23f226',
'aphront-panel-view-css' => 'ad23f226',
'aphront-table-view-css' => 'ad23f226',
'aphront-tokenizer-control-css' => 'ad23f226',
'aphront-tooltip-css' => 'ad23f226',
'aphront-typeahead-control-css' => 'ad23f226',
'differential-changeset-view-css' => '1b8a291d',
'differential-core-view-css' => '1b8a291d',
'differential-inline-comment-editor' => '5e9e5c4e',
@ -4535,7 +4535,7 @@ celerity_register_resource_map(array(
'differential-table-of-contents-css' => '1b8a291d',
'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88',
'global-drag-and-drop-css' => '0ed58ed4',
'global-drag-and-drop-css' => 'ad23f226',
'inline-comment-summary-css' => '1b8a291d',
'javelin-aphlict' => 'adee86d9',
'javelin-behavior' => '3e3be199',
@ -4610,56 +4610,56 @@ celerity_register_resource_map(array(
'javelin-util' => '3e3be199',
'javelin-vector' => '3e3be199',
'javelin-workflow' => '3e3be199',
'lightbox-attachment-css' => '0ed58ed4',
'lightbox-attachment-css' => 'ad23f226',
'maniphest-task-summary-css' => '49898640',
'phabricator-action-list-view-css' => '0ed58ed4',
'phabricator-application-launch-view-css' => '0ed58ed4',
'phabricator-action-list-view-css' => 'ad23f226',
'phabricator-application-launch-view-css' => 'ad23f226',
'phabricator-busy' => 'adee86d9',
'phabricator-content-source-view-css' => '1b8a291d',
'phabricator-core-css' => '0ed58ed4',
'phabricator-crumbs-view-css' => '0ed58ed4',
'phabricator-core-css' => 'ad23f226',
'phabricator-crumbs-view-css' => 'ad23f226',
'phabricator-drag-and-drop-file-upload' => '5e9e5c4e',
'phabricator-dropdown-menu' => 'adee86d9',
'phabricator-file-upload' => 'adee86d9',
'phabricator-filetree-view-css' => '0ed58ed4',
'phabricator-flag-css' => '0ed58ed4',
'phabricator-filetree-view-css' => 'ad23f226',
'phabricator-flag-css' => 'ad23f226',
'phabricator-hovercard' => 'adee86d9',
'phabricator-jump-nav' => '0ed58ed4',
'phabricator-jump-nav' => 'ad23f226',
'phabricator-keyboard-shortcut' => 'adee86d9',
'phabricator-keyboard-shortcut-manager' => 'adee86d9',
'phabricator-main-menu-view' => '0ed58ed4',
'phabricator-main-menu-view' => 'ad23f226',
'phabricator-menu-item' => 'adee86d9',
'phabricator-nav-view-css' => '0ed58ed4',
'phabricator-nav-view-css' => 'ad23f226',
'phabricator-notification' => 'adee86d9',
'phabricator-notification-css' => '0ed58ed4',
'phabricator-notification-menu-css' => '0ed58ed4',
'phabricator-notification-css' => 'ad23f226',
'phabricator-notification-menu-css' => 'ad23f226',
'phabricator-object-selector-css' => '1b8a291d',
'phabricator-phtize' => 'adee86d9',
'phabricator-prefab' => 'adee86d9',
'phabricator-project-tag-css' => '49898640',
'phabricator-remarkup-css' => '0ed58ed4',
'phabricator-remarkup-css' => 'ad23f226',
'phabricator-shaped-request' => '5e9e5c4e',
'phabricator-side-menu-view-css' => '0ed58ed4',
'phabricator-standard-page-view' => '0ed58ed4',
'phabricator-tag-view-css' => '0ed58ed4',
'phabricator-side-menu-view-css' => 'ad23f226',
'phabricator-standard-page-view' => 'ad23f226',
'phabricator-tag-view-css' => 'ad23f226',
'phabricator-textareautils' => 'adee86d9',
'phabricator-tooltip' => 'adee86d9',
'phabricator-transaction-view-css' => '0ed58ed4',
'phabricator-zindex-css' => '0ed58ed4',
'phui-button-css' => '0ed58ed4',
'phui-form-css' => '0ed58ed4',
'phui-form-view-css' => '0ed58ed4',
'phui-header-view-css' => '0ed58ed4',
'phui-icon-view-css' => '0ed58ed4',
'phui-list-view-css' => '0ed58ed4',
'phui-object-item-list-view-css' => '0ed58ed4',
'phui-property-list-view-css' => '0ed58ed4',
'phui-spacing-css' => '0ed58ed4',
'sprite-apps-large-css' => '0ed58ed4',
'sprite-gradient-css' => '0ed58ed4',
'sprite-icons-css' => '0ed58ed4',
'sprite-menu-css' => '0ed58ed4',
'sprite-status-css' => '0ed58ed4',
'syntax-highlighting-css' => '0ed58ed4',
'phabricator-transaction-view-css' => 'ad23f226',
'phabricator-zindex-css' => 'ad23f226',
'phui-button-css' => 'ad23f226',
'phui-form-css' => 'ad23f226',
'phui-form-view-css' => 'ad23f226',
'phui-header-view-css' => 'ad23f226',
'phui-icon-view-css' => 'ad23f226',
'phui-list-view-css' => 'ad23f226',
'phui-object-item-list-view-css' => 'ad23f226',
'phui-property-list-view-css' => 'ad23f226',
'phui-spacing-css' => 'ad23f226',
'sprite-apps-large-css' => 'ad23f226',
'sprite-gradient-css' => 'ad23f226',
'sprite-icons-css' => 'ad23f226',
'sprite-menu-css' => 'ad23f226',
'sprite-status-css' => 'ad23f226',
'syntax-highlighting-css' => 'ad23f226',
),
));

View file

@ -35,10 +35,15 @@ final class PhabricatorCrumbsView extends AphrontView {
foreach ($this->actions as $action) {
$icon = null;
if ($action->getIcon()) {
$icon_name = $action->getIcon();
if ($action->getDisabled()) {
$icon_name .= '-grey';
}
$icon = phutil_tag(
'span',
array(
'class' => 'sprite-icons icons-'.$action->getIcon(),
'class' => 'sprite-icons icons-'.$icon_name,
),
'');
}
@ -55,6 +60,11 @@ final class PhabricatorCrumbsView extends AphrontView {
}
$action_classes = $action->getClasses();
$action_classes[] = 'phabricator-crumbs-action';
if ($action->getDisabled()) {
$action_classes[] = 'phabricator-crumbs-action-disabled';
}
$actions[] = javelin_tag(
'a',
array(

View file

@ -25,6 +25,10 @@
text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}
.phabricator-crumbs-view a.phabricator-crumbs-action-disabled {
color: {$lightgreytext};
}
.phabricator-crumbs-action.phabricator-crumbs-action-menu {
display: none;
}