@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a selected button ui state

Summary: Only for grey buttons, but can expand. Sets a selected class.

Test Plan: Review new changes in UIExamples.

Reviewers: epriestley

Reviewed By: epriestley

Spies: Korvin

Differential Revision: https://secure.phabricator.com/D18501

+44 -9
+9 -9
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'e68cf1fa', 11 11 'conpherence.pkg.js' => 'b5b51108', 12 - 'core.pkg.css' => '2bee293d', 12 + 'core.pkg.css' => '0437a674', 13 13 'core.pkg.js' => '6c085267', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '45951e9e', ··· 127 127 'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829', 128 128 'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494', 129 129 'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68', 130 - 'rsrc/css/phui/button/phui-button.css' => 'a37aa3a8', 130 + 'rsrc/css/phui/button/phui-button.css' => '1863cc6e', 131 131 'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893', 132 132 'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600', 133 133 'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf', ··· 529 529 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 530 530 'rsrc/js/phuix/PHUIXActionView.js' => '442efd08', 531 531 'rsrc/js/phuix/PHUIXAutocomplete.js' => '4b7430ab', 532 - 'rsrc/js/phuix/PHUIXButtonView.js' => 'a37126bd', 532 + 'rsrc/js/phuix/PHUIXButtonView.js' => '8a91e1ac', 533 533 'rsrc/js/phuix/PHUIXDropdownMenu.js' => '8018ee50', 534 534 'rsrc/js/phuix/PHUIXExample.js' => '68af71ca', 535 535 'rsrc/js/phuix/PHUIXFormControl.js' => '83e03671', ··· 824 824 'phui-big-info-view-css' => 'acc3492c', 825 825 'phui-box-css' => '745e881d', 826 826 'phui-button-bar-css' => 'f1ff5494', 827 - 'phui-button-css' => 'a37aa3a8', 827 + 'phui-button-css' => '1863cc6e', 828 828 'phui-button-simple-css' => '8e1baf68', 829 829 'phui-calendar-css' => 'f1ddf11c', 830 830 'phui-calendar-day-css' => '572b1893', ··· 882 882 'phuix-action-list-view' => 'b5c256b8', 883 883 'phuix-action-view' => '442efd08', 884 884 'phuix-autocomplete' => '4b7430ab', 885 - 'phuix-button-view' => 'a37126bd', 885 + 'phuix-button-view' => '8a91e1ac', 886 886 'phuix-dropdown-menu' => '8018ee50', 887 887 'phuix-form-control-view' => '83e03671', 888 888 'phuix-icon-view' => 'bff6884b', ··· 1557 1557 'javelin-install', 1558 1558 'javelin-dom', 1559 1559 ), 1560 + '8a91e1ac' => array( 1561 + 'javelin-install', 1562 + 'javelin-dom', 1563 + ), 1560 1564 '8ce821c5' => array( 1561 1565 'phabricator-notification', 1562 1566 'javelin-stratcom', ··· 1695 1699 'javelin-leader', 1696 1700 'javelin-sound', 1697 1701 'phabricator-notification', 1698 - ), 1699 - 'a37126bd' => array( 1700 - 'javelin-install', 1701 - 'javelin-dom', 1702 1702 ), 1703 1703 'a3a63478' => array( 1704 1704 'phui-workcard-view-css',
+4
src/applications/uiexample/examples/PHUIButtonExample.php
··· 83 83 ), 84 84 array( 85 85 'icon' => 'fa-upload', 86 + 'disabled' => true, 86 87 ), 87 88 array( 88 89 'icon' => 'fa-street-view', 90 + 'selected' => true, 89 91 ), 90 92 array( 91 93 'text' => pht('Copy "Quack" to Clipboard'), ··· 99 101 ->setColor(PHUIButtonView::GREY) 100 102 ->setIcon(idx($spec, 'icon')) 101 103 ->setText(idx($spec, 'text')) 104 + ->setSelected(idx($spec, 'selected')) 105 + ->setDisabled(idx($spec, 'disabled')) 102 106 ->addClass(PHUI::MARGIN_SMALL_RIGHT) 103 107 ->setDropdown(idx($spec, 'dropdown')); 104 108
+10
src/view/phui/PHUIButtonView.php
··· 25 25 private $href = null; 26 26 private $title = null; 27 27 private $disabled; 28 + private $selected; 28 29 private $name; 29 30 private $tooltip; 30 31 private $noCSS; ··· 71 72 72 73 public function setDisabled($disabled) { 73 74 $this->disabled = $disabled; 75 + return $this; 76 + } 77 + 78 + public function setSelected($selected) { 79 + $this->selected = $selected; 74 80 return $this; 75 81 } 76 82 ··· 187 193 188 194 if ($this->disabled) { 189 195 $classes[] = 'disabled'; 196 + } 197 + 198 + if ($this->selected) { 199 + $classes[] = 'selected'; 190 200 } 191 201 192 202 switch ($this->getButtonType()) {
+13
webroot/rsrc/css/phui/button/phui-button.css
··· 105 105 opacity: 0.5; 106 106 } 107 107 108 + button.button-grey.selected, 109 + a.button.button-grey.selected, 110 + button.button-grey.selected:hover, 111 + a.button.button-grey.selected:hover { 112 + border-color: {$sh-orangetext}; 113 + color: {$sh-orangetext}; 114 + } 115 + 116 + button.button-grey.selected .phui-icon-view, 117 + a.button-grey.selected .phui-icon-view { 118 + color: {$sh-orangetext}; 119 + } 120 + 108 121 a.phuix-dropdown-open { 109 122 color: {$greytext}; 110 123 }
+8
webroot/rsrc/js/phuix/PHUIXButtonView.js
··· 16 16 17 17 _iconView: null, 18 18 _color: null, 19 + _selected: null, 19 20 _buttonType: null, 20 21 21 22 setIcon: function(icon) { ··· 40 41 this._color = color; 41 42 JX.DOM.alterClass(node, 'button-' + this._color, true); 42 43 44 + return this; 45 + }, 46 + 47 + setSelected: function(selected) { 48 + var node = this.getNode(); 49 + this._selected = selected; 50 + JX.DOM.alterClass(node, 'selected', this._selected); 43 51 return this; 44 52 }, 45 53