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

Clean up dropdown carets

Summary: Adds dropdown carets to buttons more universally that are actually dropdowns.

Test Plan: Differential, Application Search, Diffusion. Mobile and Desktop.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18292
This commit is contained in:
Chad Little 2017-07-28 15:11:08 -07:00
parent ee884db1f9
commit ea0db5aa9d
4 changed files with 28 additions and 30 deletions

View file

@ -9,7 +9,7 @@ return array(
'names' => array(
'conpherence.pkg.css' => 'e68cf1fa',
'conpherence.pkg.js' => 'b5b51108',
'core.pkg.css' => 'd6046dd9',
'core.pkg.css' => 'd9c9cfd0',
'core.pkg.js' => '5d80e0db',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e',
@ -127,7 +127,7 @@ return array(
'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829',
'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494',
'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68',
'rsrc/css/phui/button/phui-button.css' => '3a744520',
'rsrc/css/phui/button/phui-button.css' => '3ca51caa',
'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893',
'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600',
'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf',
@ -825,7 +825,7 @@ return array(
'phui-big-info-view-css' => 'd13afcde',
'phui-box-css' => '745e881d',
'phui-button-bar-css' => 'f1ff5494',
'phui-button-css' => '3a744520',
'phui-button-css' => '3ca51caa',
'phui-button-simple-css' => '8e1baf68',
'phui-calendar-css' => 'f1ddf11c',
'phui-calendar-day-css' => '572b1893',

View file

@ -554,7 +554,7 @@ final class PhabricatorApplicationSearchController
return id(new PHUIButtonView())
->setTag('a')
->setHref('#')
->setText(pht('Use Results...'))
->setText(pht('Use Results'))
->setIcon('fa-bars')
->setDropdownMenu($action_list)
->addClass('dropdown');

View file

@ -134,6 +134,7 @@ final class PHUIButtonView extends AphrontTagView {
Javelin::initBehavior('phui-dropdown-menu');
$this->addSigil('phui-dropdown-menu');
$this->setDropdown(true);
$this->setMetadata($actions->getDropdownMenuMetadata());
return $this;
@ -223,12 +224,10 @@ final class PHUIButtonView extends AphrontTagView {
protected function getTagContent() {
$icon = null;
$text = $this->text;
if ($this->icon) {
$icon = $this->icon;
$text = null;
$subtext = null;
if ($this->subtext) {
$subtext = phutil_tag(
'div',
@ -245,11 +244,10 @@ final class PHUIButtonView extends AphrontTagView {
'class' => 'phui-button-text',
),
array(
$text,
$this->text,
$subtext,
));
}
}
$caret = null;
if ($this->dropdown || $this->getHasCaret()) {
@ -259,7 +257,7 @@ final class PHUIButtonView extends AphrontTagView {
if ($this->iconFirst == true) {
return array($icon, $text, $caret);
} else {
return array($text, $icon);
return array($text, $icon, $caret);
}
}
}

View file

@ -270,7 +270,7 @@ a.policy-control .phui-button-text {
}
.dropdown .phui-button-text {
margin-right: 16px;
margin-right: 8px;
}
.button.has-icon .phui-button-text {