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

Remove setBarColor from PHUITagView

Summary: Also tweaked spacing on the dots.

Test Plan: UIExamples

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7968
This commit is contained in:
Chad Little 2014-01-14 14:18:52 -08:00
parent 31a2bebf63
commit 9f6aa3526a
4 changed files with 6 additions and 40 deletions

View file

@ -7,7 +7,7 @@
return array(
'names' =>
array(
'core.pkg.css' => 'cc7229ab',
'core.pkg.css' => '95ab640c',
'core.pkg.js' => 'c907bd96',
'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => '827749c1',
@ -142,7 +142,7 @@ return array(
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
'rsrc/css/phui/phui-spacing.css' => '042804d6',
'rsrc/css/phui/phui-status.css' => '2f562399',
'rsrc/css/phui/phui-tag-view.css' => '428d5017',
'rsrc/css/phui/phui-tag-view.css' => '295d81c4',
'rsrc/css/phui/phui-text.css' => '23e9b4b7',
'rsrc/css/phui/phui-workboard-view.css' => 'bf70dd2e',
'rsrc/css/phui/phui-workpanel-view.css' => 'ffb31e99',
@ -748,7 +748,7 @@ return array(
'phui-remarkup-preview-css' => '19ad512b',
'phui-spacing-css' => '042804d6',
'phui-status-list-view-css' => '2f562399',
'phui-tag-view-css' => '428d5017',
'phui-tag-view-css' => '295d81c4',
'phui-text-css' => '23e9b4b7',
'phui-workboard-view-css' => 'bf70dd2e',
'phui-workpanel-view-css' => 'ffb31e99',

View file

@ -69,7 +69,6 @@ final class PHUITagExample extends PhabricatorUIExample {
$intro[] = id(new PHUITagView())
->setType(PHUITagView::TYPE_OBJECT)
->setName('T123: Water The Dog')
->setBarColor(PHUITagView::COLOR_RED)
->setHref('#');
$intro[] = ' -- that task is ';
$intro[] = id(new PHUITagView())

View file

@ -26,7 +26,6 @@ final class PHUITagView extends AphrontView {
private $phid;
private $backgroundColor;
private $dotColor;
private $barColor;
private $closed;
private $external;
private $id;
@ -54,11 +53,6 @@ final class PHUITagView extends AphrontView {
return $this;
}
public function setBarColor($bar_color) {
$this->barColor = $bar_color;
return $this;
}
public function setDotColor($dot_color) {
$this->dotColor = $dot_color;
return $this;
@ -143,19 +137,6 @@ final class PHUITagView extends AphrontView {
),
array($dot, $this->name));
if ($this->barColor) {
$barcolor = 'phui-tag-color-'.$this->barColor;
$bar = phutil_tag(
'span',
array(
'class' => 'phui-tag-bar '.$barcolor,
),
'');
$classes[] = 'phui-tag-view-has-bar';
} else {
$bar = null;
}
if ($this->phid) {
Javelin::initBehavior('phabricator-hovercards');
@ -171,7 +152,7 @@ final class PHUITagView extends AphrontView {
),
'target' => $this->external ? '_blank' : null,
),
array($bar, $icon, $content));
array($icon, $content));
} else {
return phutil_tag(
$this->href ? 'a' : 'span',
@ -181,7 +162,7 @@ final class PHUITagView extends AphrontView {
'class' => implode(' ', $classes),
'target' => $this->external ? '_blank' : null,
),
array($bar, $icon, $content));
array($icon, $content));
}
}

View file

@ -39,21 +39,15 @@ a.phui-tag-view:hover {
padding-left: 22px;
}
.phui-tag-view-has-bar .phui-tag-core {
border-radius: 0 3px 3px 0;
border-width: 1px 1px 1px 0;
}
.phui-tag-dot {
position: relative;
display: inline-block;
width: 6px;
height: 6px;
margin-right: 3px;
margin-right: 4px;
top: -1px;
border-radius: 6px;
border: 1px solid transparent;
box-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}
.phui-tag-type-state {
@ -141,11 +135,3 @@ a.phui-tag-view:hover
.phui-tag-core.phui-tag-color-object {
border-color: #d7d7d7;
}
.phui-tag-bar {
padding-left: 4px;
border-width: 1px;
border-style: solid;
border-right-color: rgba(0, 0, 0, 0.33);
border-radius: 2px 0 0 2px;
}