1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 16:30:59 +01:00

Revert "Add "state icons" to ObjectItemListView"

Summary: This reverts commit e70bb28ea0. We didn't end up using these.

Test Plan: Looked at Differential.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6357
This commit is contained in:
epriestley 2013-07-03 08:54:45 -07:00
parent 82b37b9fd8
commit cd011be254
4 changed files with 45 additions and 188 deletions

View file

@ -3249,7 +3249,7 @@ celerity_register_resource_map(array(
),
'phabricator-object-item-list-view-css' =>
array(
'uri' => '/res/85921314/rsrc/css/layout/phabricator-object-item-list-view.css',
'uri' => '/res/eea92c62/rsrc/css/layout/phabricator-object-item-list-view.css',
'type' => 'css',
'requires' =>
array(
@ -4073,7 +4073,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'e00fd709' =>
'f38244f0' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@ -4121,7 +4121,7 @@ celerity_register_resource_map(array(
40 => 'phabricator-property-list-view-css',
41 => 'phabricator-tag-view-css',
),
'uri' => '/res/pkg/e00fd709/core.pkg.css',
'uri' => '/res/pkg/f38244f0/core.pkg.css',
'type' => 'css',
),
'f2ad0683' =>
@ -4315,16 +4315,16 @@ celerity_register_resource_map(array(
'reverse' =>
array(
'aphront-attached-file-view-css' => 'adc3c36d',
'aphront-dialog-view-css' => 'e00fd709',
'aphront-error-view-css' => 'e00fd709',
'aphront-form-view-css' => 'e00fd709',
'aphront-list-filter-view-css' => 'e00fd709',
'aphront-pager-view-css' => 'e00fd709',
'aphront-panel-view-css' => 'e00fd709',
'aphront-table-view-css' => 'e00fd709',
'aphront-tokenizer-control-css' => 'e00fd709',
'aphront-tooltip-css' => 'e00fd709',
'aphront-typeahead-control-css' => 'e00fd709',
'aphront-dialog-view-css' => 'f38244f0',
'aphront-error-view-css' => 'f38244f0',
'aphront-form-view-css' => 'f38244f0',
'aphront-list-filter-view-css' => 'f38244f0',
'aphront-pager-view-css' => 'f38244f0',
'aphront-panel-view-css' => 'f38244f0',
'aphront-table-view-css' => 'f38244f0',
'aphront-tokenizer-control-css' => 'f38244f0',
'aphront-tooltip-css' => 'f38244f0',
'aphront-typeahead-control-css' => 'f38244f0',
'differential-changeset-view-css' => 'dd27a69b',
'differential-core-view-css' => 'dd27a69b',
'differential-inline-comment-editor' => '9488bb69',
@ -4338,7 +4338,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' => 'e00fd709',
'global-drag-and-drop-css' => 'f38244f0',
'inline-comment-summary-css' => 'dd27a69b',
'javelin-aphlict' => 'f2ad0683',
'javelin-behavior' => 'a9f14d76',
@ -4412,55 +4412,55 @@ celerity_register_resource_map(array(
'javelin-util' => 'a9f14d76',
'javelin-vector' => 'a9f14d76',
'javelin-workflow' => 'a9f14d76',
'lightbox-attachment-css' => 'e00fd709',
'lightbox-attachment-css' => 'f38244f0',
'maniphest-task-summary-css' => 'adc3c36d',
'maniphest-transaction-detail-css' => 'adc3c36d',
'phabricator-action-list-view-css' => 'e00fd709',
'phabricator-application-launch-view-css' => 'e00fd709',
'phabricator-action-list-view-css' => 'f38244f0',
'phabricator-application-launch-view-css' => 'f38244f0',
'phabricator-busy' => 'f2ad0683',
'phabricator-content-source-view-css' => 'dd27a69b',
'phabricator-core-css' => 'e00fd709',
'phabricator-crumbs-view-css' => 'e00fd709',
'phabricator-core-css' => 'f38244f0',
'phabricator-crumbs-view-css' => 'f38244f0',
'phabricator-drag-and-drop-file-upload' => '9488bb69',
'phabricator-dropdown-menu' => 'f2ad0683',
'phabricator-file-upload' => 'f2ad0683',
'phabricator-filetree-view-css' => 'e00fd709',
'phabricator-flag-css' => 'e00fd709',
'phabricator-form-view-css' => 'e00fd709',
'phabricator-header-view-css' => 'e00fd709',
'phabricator-filetree-view-css' => 'f38244f0',
'phabricator-flag-css' => 'f38244f0',
'phabricator-form-view-css' => 'f38244f0',
'phabricator-header-view-css' => 'f38244f0',
'phabricator-hovercard' => 'f2ad0683',
'phabricator-jump-nav' => 'e00fd709',
'phabricator-jump-nav' => 'f38244f0',
'phabricator-keyboard-shortcut' => 'f2ad0683',
'phabricator-keyboard-shortcut-manager' => 'f2ad0683',
'phabricator-main-menu-view' => 'e00fd709',
'phabricator-main-menu-view' => 'f38244f0',
'phabricator-menu-item' => 'f2ad0683',
'phabricator-nav-view-css' => 'e00fd709',
'phabricator-nav-view-css' => 'f38244f0',
'phabricator-notification' => 'f2ad0683',
'phabricator-notification-css' => 'e00fd709',
'phabricator-notification-menu-css' => 'e00fd709',
'phabricator-object-item-list-view-css' => 'e00fd709',
'phabricator-notification-css' => 'f38244f0',
'phabricator-notification-menu-css' => 'f38244f0',
'phabricator-object-item-list-view-css' => 'f38244f0',
'phabricator-object-selector-css' => 'dd27a69b',
'phabricator-phtize' => 'f2ad0683',
'phabricator-prefab' => 'f2ad0683',
'phabricator-project-tag-css' => 'adc3c36d',
'phabricator-property-list-view-css' => 'e00fd709',
'phabricator-remarkup-css' => 'e00fd709',
'phabricator-property-list-view-css' => 'f38244f0',
'phabricator-remarkup-css' => 'f38244f0',
'phabricator-shaped-request' => '9488bb69',
'phabricator-side-menu-view-css' => 'e00fd709',
'phabricator-standard-page-view' => 'e00fd709',
'phabricator-tag-view-css' => 'e00fd709',
'phabricator-side-menu-view-css' => 'f38244f0',
'phabricator-standard-page-view' => 'f38244f0',
'phabricator-tag-view-css' => 'f38244f0',
'phabricator-textareautils' => 'f2ad0683',
'phabricator-tooltip' => 'f2ad0683',
'phabricator-transaction-view-css' => 'e00fd709',
'phabricator-zindex-css' => 'e00fd709',
'phui-button-css' => 'e00fd709',
'phui-form-css' => 'e00fd709',
'phui-icon-view-css' => 'e00fd709',
'phui-spacing-css' => 'e00fd709',
'sprite-apps-large-css' => 'e00fd709',
'sprite-gradient-css' => 'e00fd709',
'sprite-icons-css' => 'e00fd709',
'sprite-menu-css' => 'e00fd709',
'syntax-highlighting-css' => 'e00fd709',
'phabricator-transaction-view-css' => 'f38244f0',
'phabricator-zindex-css' => 'f38244f0',
'phui-button-css' => 'f38244f0',
'phui-form-css' => 'f38244f0',
'phui-icon-view-css' => 'f38244f0',
'phui-spacing-css' => 'f38244f0',
'sprite-apps-large-css' => 'f38244f0',
'sprite-gradient-css' => 'f38244f0',
'sprite-icons-css' => 'f38244f0',
'sprite-menu-css' => 'f38244f0',
'syntax-highlighting-css' => 'f38244f0',
),
));

View file

@ -289,57 +289,6 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample {
$out[] = array($head, $list);
$head = id(new PhabricatorHeaderView())
->setHeader(pht('State Icons'));
$list = new PhabricatorObjectItemListView();
$list->addItem(
id(new PhabricatorObjectItemView())
->setHeader(pht('Item With State'))
->addStateIcon('blame'));
$list->addItem(
id(new PhabricatorObjectItemView())
->setHeader(pht('Grippable Item With State'))
->setGrippable(true)
->addStateIcon('blame'));
$list->addItem(
id(new PhabricatorObjectItemView())
->setHeader(pht('Two State'))
->setStateIconColumns(2)
->addStateIcon('blame')
->addStateIcon('blame'));
$list->addItem(
id(new PhabricatorObjectItemView())
->setHeader(pht('Grippable Two State'))
->setGrippable(true)
->setStateIconColumns(2)
->addStateIcon('blame')
->addStateIcon('blame'));
$list->addItem(
id(new PhabricatorObjectItemView())
->setHeader(pht('Three State'))
->addAttribute(pht('The quick brown fox...'))
->setStateIconColumns(2)
->addStateIcon('home')
->addStateIcon('tag')
->addStateIcon('unlock'));
$list->addItem(
id(new PhabricatorObjectItemView())
->setHeader(pht('Four State'))
->addAttribute(pht('...jumps over the lazy dog.'))
->setStateIconColumns(2)
->addStateIcon('world-grey', pht('World'))
->addStateIcon('fork-grey', pht('Fork'))
->addStateIcon('herald-grey', pht('Herald'))
->addStateIcon('preview-grey', pht('Eye')));
$out[] = array($head, $list);
return $out;
}
}

View file

@ -16,27 +16,8 @@ final class PhabricatorObjectItemView extends AphrontTagView {
private $bylines = array();
private $grippable;
private $actions = array();
private $stateIconColumns = 0;
private $stateIcons = array();
private $headIcons = array();
public function setStateIconColumns($state_icon_columns) {
$this->stateIconColumns = $state_icon_columns;
return $this;
}
public function addStateIcon($name, $label = null, $attributes = array()) {
$this->stateIcons[] = array(
'name' => $name,
'label' => $label,
'attributes' => $attributes,
);
if (!$this->stateIconColumns) {
$this->stateIconColumns = 1;
}
return $this;
}
public function addHeadIcon($icon) {
$this->headIcons[] = $icon;
return $this;
@ -208,11 +189,6 @@ final class PhabricatorObjectItemView extends AphrontTagView {
$item_classes[] = 'phabricator-object-item-grippable';
}
if ($this->stateIconColumns) {
$cols = $this->stateIconColumns;
$item_classes[] = 'phabricator-object-item-state-'.$cols.'-cols';
}
return array(
'class' => $item_classes,
);
@ -424,34 +400,6 @@ final class PhabricatorObjectItemView extends AphrontTagView {
'');
}
$state_icons = null;
if ($this->stateIconColumns) {
$state_icon_list = array();
foreach ($this->stateIcons as $state_icon) {
$sicon = id(new PHUIIconView())
->setSpriteSheet(PHUIIconView::SPRITE_ICONS)
->setSpriteIcon($state_icon['name']);
if ($state_icon['label']) {
$sicon->addSigil('has-tooltip');
$sicon->setMetadata(
array(
'tip' => $state_icon['label'],
));
}
$state_icon_list[] = $sicon;
}
$cols = $this->stateIconColumns;
$state_icons = phutil_tag(
'div',
array(
'class' => 'phabricator-object-item-state-icons '.
'state-icon-'.$cols.'-cols',
),
$state_icon_list);
}
$content = phutil_tag(
'div',
array(
@ -471,7 +419,6 @@ final class PhabricatorObjectItemView extends AphrontTagView {
),
array(
$grippable,
$state_icons,
$header,
$icons,
$bylines,

View file

@ -89,49 +89,10 @@
background: url(/rsrc/image/texture/grip.png) center center no-repeat;
}
.phabricator-object-item-state-icons {
top: 0;
left: 4px;
width: 20px;
position: absolute;
padding: 6px 4px;
}
.phabricator-object-item-state-icons span.phui-icon-view {
display: inline-block;
margin: 1px 2px 2px;
}
.phabricator-object-item-grippable .phabricator-object-item-state-icons {
left: 15px;
}
.state-icon-2-cols {
width: 40px;
}
.phabricator-object-item-grippable .phabricator-object-item-frame {
padding-left: 11px;
}
.phabricator-object-item-state-1-cols .phabricator-object-item-frame {
padding-left: 24px;
}
.phabricator-object-item-state-2-cols .phabricator-object-item-frame {
padding-left: 44px;
}
.phabricator-object-item-grippable.phabricator-object-item-state-1-cols
.phabricator-object-item-frame {
padding-left: 35px;
}
.phabricator-object-item-grippable.phabricator-object-item-state-2-cols
.phabricator-object-item-frame {
padding-left: 55px;
}
.phabricator-object-item-list-header {
padding: 0 0 8px 0;
color: #555555;