diff --git a/src/view/layout/PhabricatorActionView.php b/src/view/layout/PhabricatorActionView.php index 351434cc6..bf745f5b7 100644 --- a/src/view/layout/PhabricatorActionView.php +++ b/src/view/layout/PhabricatorActionView.php @@ -1,158 +1,159 @@ <?php /* * Copyright 2012 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ final class PhabricatorActionView extends AphrontView { private $name; private $user; private $icon; private $href; private $disabled; private $workflow; private $renderAsForm; public function setHref($href) { $this->href = $href; return $this; } public function setIcon($icon) { $this->icon = $icon; return $this; } public function setName($name) { $this->name = $name; return $this; } public function setDisabled($disabled) { $this->disabled = $disabled; return $this; } public function setWorkflow($workflow) { $this->workflow = $workflow; return $this; } public function setRenderAsForm($form) { $this->renderAsForm = $form; return $this; } public function setUser(PhabricatorUser $user) { $this->user = $user; return $this; } public function render() { $icon = null; if ($this->icon) { $icon = phutil_render_tag( 'span', array( 'class' => 'phabricator-action-view-icon autosprite '. 'action-'.$this->icon, ), ''); } if ($this->href) { if ($this->renderAsForm) { if (!$this->user) { throw new Exception( 'Call setUser() when rendering an action as a form.'); } $item = javelin_render_tag( 'button', array( 'class' => 'phabricator-action-view-item', ), phutil_escape_html($this->name)); $item = phabricator_render_form( $this->user, array( 'action' => $this->href, 'method' => 'POST', 'sigil' => $this->workflow ? 'workflow' : null, ), $item); } else { $item = javelin_render_tag( 'a', array( 'href' => $this->href, 'class' => 'phabricator-action-view-item', 'sigil' => $this->workflow ? 'workflow' : null, ), phutil_escape_html($this->name)); } } else { $item = phutil_render_tag( 'span', array( 'class' => 'phabricator-action-view-item', ), phutil_escape_html($this->name)); } $classes = array(); $classes[] = 'phabricator-action-view'; if ($this->disabled) { $classes[] = 'phabricator-action-view-disabled'; } return phutil_render_tag( 'li', array( 'class' => implode(' ', $classes), ), $icon.$item); } public static function getAvailableIcons() { return array( 'delete', + 'download', 'edit', 'file', 'flag-0', 'flag-1', 'flag-2', 'flag-3', 'flag-4', 'flag-5', 'flag-6', 'flag-7', 'flag-ghost', 'fork', 'move', 'new', 'preview', 'subscribe-add', 'subscribe-auto', 'subscribe-delete', 'unpublish', 'world', ); } } diff --git a/webroot/rsrc/css/autosprite.css b/webroot/rsrc/css/autosprite.css index 19c4a6786..474b24f25 100644 --- a/webroot/rsrc/css/autosprite.css +++ b/webroot/rsrc/css/autosprite.css @@ -1,853 +1,857 @@ /** * @provides autosprite-css * @generated */ .autosprite { background-image: url(/rsrc/image/autosprite.png); background-repeat: no-repeat; } .main-menu-item-icon-help { background-position: 0px 0px; } .main-menu-item-icon-help-selected { background-position: 0px -27px; } .main-menu-item-icon-help:hover { background-position: 0px -54px; } .main-menu-item-icon-settings { background-position: 0px -81px; } .main-menu-item-icon-settings-selected { background-position: 0px -108px; } .main-menu-item-icon-settings:hover { background-position: 0px -135px; } .main-menu-item-icon-logout { background-position: 0px -162px; } .main-menu-item-icon-logout-selected { background-position: 0px -189px; } .main-menu-item-icon-logout:hover { background-position: 0px -216px; } .main-menu-item-icon-notifications { background-position: 0px -243px; } .main-menu-item-icon-notifications-selected { background-position: 0px -270px; } .main-menu-item-icon-notifications:hover { background-position: 0px -297px; } .main-menu-item-icon-task { background-position: 0px -324px; } .main-menu-item-icon-task-selected { background-position: 0px -351px; } .main-menu-item-icon-task:hover { background-position: 0px -378px; } .app-differential-large { background-position: 0px -405px; } .device-desktop .phabricator-application-launch-container:hover .app-differential-large /* hover */ { background-position: 0px -466px; } .app-differential { background-position: 0px -527px; } .device-desktop .app-differential:hover { background-position: 0px -558px; } .app-differential-selected { background-position: 0px -589px; } .app-fact-large { background-position: 0px -620px; } .device-desktop .phabricator-application-launch-container:hover .app-fact-large /* hover */ { background-position: 0px -681px; } .app-fact { background-position: 0px -742px; } .device-desktop .app-fact:hover { background-position: 0px -773px; } .app-fact-selected { background-position: 0px -804px; } .app-mail-large { background-position: 0px -835px; } .device-desktop .phabricator-application-launch-container:hover .app-mail-large /* hover */ { background-position: 0px -896px; } .app-mail { background-position: 0px -957px; } .device-desktop .app-mail:hover { background-position: 0px -988px; } .app-mail-selected { background-position: 0px -1019px; } .app-diffusion-large { background-position: 0px -1050px; } .device-desktop .phabricator-application-launch-container:hover .app-diffusion-large /* hover */ { background-position: 0px -1111px; } .app-diffusion { background-position: 0px -1172px; } .device-desktop .app-diffusion:hover { background-position: 0px -1203px; } .app-diffusion-selected { background-position: 0px -1234px; } .app-slowvote-large { background-position: 0px -1265px; } .device-desktop .phabricator-application-launch-container:hover .app-slowvote-large /* hover */ { background-position: 0px -1326px; } .app-slowvote { background-position: 0px -1387px; } .device-desktop .app-slowvote:hover { background-position: 0px -1418px; } .app-slowvote-selected { background-position: 0px -1449px; } .app-phriction-large { background-position: 0px -1480px; } .device-desktop .phabricator-application-launch-container:hover .app-phriction-large /* hover */ { background-position: 0px -1541px; } .app-phriction { background-position: 0px -1602px; } .device-desktop .app-phriction:hover { background-position: 0px -1633px; } .app-phriction-selected { background-position: 0px -1664px; } .app-maniphest-large { background-position: 0px -1695px; } .device-desktop .phabricator-application-launch-container:hover .app-maniphest-large /* hover */ { background-position: 0px -1756px; } .app-maniphest { background-position: 0px -1817px; } .device-desktop .app-maniphest:hover { background-position: 0px -1848px; } .app-maniphest-selected { background-position: 0px -1879px; } .app-flags-large { background-position: 0px -1910px; } .device-desktop .phabricator-application-launch-container:hover .app-flags-large /* hover */ { background-position: 0px -1971px; } .app-flags { background-position: 0px -2032px; } .device-desktop .app-flags:hover { background-position: 0px -2063px; } .app-flags-selected { background-position: 0px -2094px; } .app-settings-large { background-position: 0px -2125px; } .device-desktop .phabricator-application-launch-container:hover .app-settings-large /* hover */ { background-position: 0px -2186px; } .app-settings { background-position: 0px -2247px; } .device-desktop .app-settings:hover { background-position: 0px -2278px; } .app-settings-selected { background-position: 0px -2309px; } .app-applications-large { background-position: 0px -2340px; } .device-desktop .phabricator-application-launch-container:hover .app-applications-large /* hover */ { background-position: 0px -2401px; } .app-applications { background-position: 0px -2462px; } .device-desktop .app-applications:hover { background-position: 0px -2493px; } .app-applications-selected { background-position: 0px -2524px; } .app-default-large { background-position: 0px -2555px; } .device-desktop .phabricator-application-launch-container:hover .app-default-large /* hover */ { background-position: 0px -2616px; } .app-default { background-position: 0px -2677px; } .device-desktop .app-default:hover { background-position: 0px -2708px; } .app-default-selected { background-position: 0px -2739px; } .app-people-large { background-position: 0px -2770px; } .device-desktop .phabricator-application-launch-container:hover .app-people-large /* hover */ { background-position: 0px -2831px; } .app-people { background-position: 0px -2892px; } .device-desktop .app-people:hover { background-position: 0px -2923px; } .app-people-selected { background-position: 0px -2954px; } .app-ponder-large { background-position: 0px -2985px; } .device-desktop .phabricator-application-launch-container:hover .app-ponder-large /* hover */ { background-position: 0px -3046px; } .app-ponder { background-position: 0px -3107px; } .device-desktop .app-ponder:hover { background-position: 0px -3138px; } .app-ponder-selected { background-position: 0px -3169px; } .app-calendar-large { background-position: 0px -3200px; } .device-desktop .phabricator-application-launch-container:hover .app-calendar-large /* hover */ { background-position: 0px -3261px; } .app-calendar { background-position: 0px -3322px; } .device-desktop .app-calendar:hover { background-position: 0px -3353px; } .app-calendar-selected { background-position: 0px -3384px; } .app-files-large { background-position: 0px -3415px; } .device-desktop .phabricator-application-launch-container:hover .app-files-large /* hover */ { background-position: 0px -3476px; } .app-files { background-position: 0px -3537px; } .device-desktop .app-files:hover { background-position: 0px -3568px; } .app-files-selected { background-position: 0px -3599px; } .app-projects-large { background-position: 0px -3630px; } .device-desktop .phabricator-application-launch-container:hover .app-projects-large /* hover */ { background-position: 0px -3691px; } .app-projects { background-position: 0px -3752px; } .device-desktop .app-projects:hover { background-position: 0px -3783px; } .app-projects-selected { background-position: 0px -3814px; } .app-daemons-large { background-position: 0px -3845px; } .device-desktop .phabricator-application-launch-container:hover .app-daemons-large /* hover */ { background-position: 0px -3906px; } .app-daemons { background-position: 0px -3967px; } .device-desktop .app-daemons:hover { background-position: 0px -3998px; } .app-daemons-selected { background-position: 0px -4029px; } .app-herald-large { background-position: 0px -4060px; } .device-desktop .phabricator-application-launch-container:hover .app-herald-large /* hover */ { background-position: 0px -4121px; } .app-herald { background-position: 0px -4182px; } .device-desktop .app-herald:hover { background-position: 0px -4213px; } .app-herald-selected { background-position: 0px -4244px; } .app-countdown-large { background-position: 0px -4275px; } .device-desktop .phabricator-application-launch-container:hover .app-countdown-large /* hover */ { background-position: 0px -4336px; } .app-countdown { background-position: 0px -4397px; } .device-desktop .app-countdown:hover { background-position: 0px -4428px; } .app-countdown-selected { background-position: 0px -4459px; } .app-conduit-large { background-position: 0px -4490px; } .device-desktop .phabricator-application-launch-container:hover .app-conduit-large /* hover */ { background-position: 0px -4551px; } .app-conduit { background-position: 0px -4612px; } .device-desktop .app-conduit:hover { background-position: 0px -4643px; } .app-conduit-selected { background-position: 0px -4674px; } .app-feed-large { background-position: 0px -4705px; } .device-desktop .phabricator-application-launch-container:hover .app-feed-large /* hover */ { background-position: 0px -4766px; } .app-feed { background-position: 0px -4827px; } .device-desktop .app-feed:hover { background-position: 0px -4858px; } .app-feed-selected { background-position: 0px -4889px; } .app-paste-large { background-position: 0px -4920px; } .device-desktop .phabricator-application-launch-container:hover .app-paste-large /* hover */ { background-position: 0px -4981px; } .app-paste { background-position: 0px -5042px; } .device-desktop .app-paste:hover { background-position: 0px -5073px; } .app-paste-selected { background-position: 0px -5104px; } .app-audit-large { background-position: 0px -5135px; } .device-desktop .phabricator-application-launch-container:hover .app-audit-large /* hover */ { background-position: 0px -5196px; } .app-audit { background-position: 0px -5257px; } .device-desktop .app-audit:hover { background-position: 0px -5288px; } .app-audit-selected { background-position: 0px -5319px; } .app-uiexample-large { background-position: 0px -5350px; } .device-desktop .phabricator-application-launch-container:hover .app-uiexample-large /* hover */ { background-position: 0px -5411px; } .app-uiexample { background-position: 0px -5472px; } .device-desktop .app-uiexample:hover { background-position: 0px -5503px; } .app-uiexample-selected { background-position: 0px -5534px; } .app-phpast-large { background-position: 0px -5565px; } .device-desktop .phabricator-application-launch-container:hover .app-phpast-large /* hover */ { background-position: 0px -5626px; } .app-phpast { background-position: 0px -5687px; } .device-desktop .app-phpast:hover { background-position: 0px -5718px; } .app-phpast-selected { background-position: 0px -5749px; } .app-owners-large { background-position: 0px -5780px; } .device-desktop .phabricator-application-launch-container:hover .app-owners-large /* hover */ { background-position: 0px -5841px; } .app-owners { background-position: 0px -5902px; } .device-desktop .app-owners:hover { background-position: 0px -5933px; } .app-owners-selected { background-position: 0px -5964px; } .app-phid-large { background-position: 0px -5995px; } .device-desktop .phabricator-application-launch-container:hover .app-phid-large /* hover */ { background-position: 0px -6056px; } .app-phid { background-position: 0px -6117px; } .device-desktop .app-phid:hover { background-position: 0px -6148px; } .app-phid-selected { background-position: 0px -6179px; } .app-diviner-large { background-position: 0px -6210px; } .device-desktop .phabricator-application-launch-container:hover .app-diviner-large /* hover */ { background-position: 0px -6271px; } .app-diviner { background-position: 0px -6332px; } .device-desktop .app-diviner:hover { background-position: 0px -6363px; } .app-diviner-selected { background-position: 0px -6394px; } .app-repositories-large { background-position: 0px -6425px; } .device-desktop .phabricator-application-launch-container:hover .app-repositories-large /* hover */ { background-position: 0px -6486px; } .app-repositories { background-position: 0px -6547px; } .device-desktop .app-repositories:hover { background-position: 0px -6578px; } .app-repositories-selected { background-position: 0px -6609px; } .app-phame-large { background-position: 0px -6640px; } .device-desktop .phabricator-application-launch-container:hover .app-phame-large /* hover */ { background-position: 0px -6701px; } .app-phame { background-position: 0px -6762px; } .device-desktop .app-phame:hover { background-position: 0px -6793px; } .app-phame-selected { background-position: 0px -6824px; } .app-macro-large { background-position: 0px -6855px; } .device-desktop .phabricator-application-launch-container:hover .app-macro-large /* hover */ { background-position: 0px -6916px; } .app-macro { background-position: 0px -6977px; } .device-desktop .app-macro:hover { background-position: 0px -7008px; } .app-macro-selected { background-position: 0px -7039px; } .app-releeph-large { background-position: 0px -7070px; } .device-desktop .phabricator-application-launch-container:hover .app-releeph-large /* hover */ { background-position: 0px -7131px; } .app-releeph { background-position: 0px -7192px; } .device-desktop .app-releeph:hover { background-position: 0px -7223px; } .app-releeph-selected { background-position: 0px -7254px; } .app-drydock-large { background-position: 0px -7285px; } .device-desktop .phabricator-application-launch-container:hover .app-drydock-large /* hover */ { background-position: 0px -7346px; } .app-drydock { background-position: 0px -7407px; } .device-desktop .app-drydock:hover { background-position: 0px -7438px; } .app-drydock-selected { background-position: 0px -7469px; } .action-delete { background-position: 0px -7500px; } -.action-edit { +.action-download { background-position: 0px -7517px; } -.action-file { +.action-edit { background-position: 0px -7534px; } -.action-flag-0 { +.action-file { background-position: 0px -7551px; } -.action-flag-1 { +.action-flag-0 { background-position: 0px -7568px; } -.action-flag-2 { +.action-flag-1 { background-position: 0px -7585px; } -.action-flag-3 { +.action-flag-2 { background-position: 0px -7602px; } -.action-flag-4 { +.action-flag-3 { background-position: 0px -7619px; } -.action-flag-5 { +.action-flag-4 { background-position: 0px -7636px; } -.action-flag-6 { +.action-flag-5 { background-position: 0px -7653px; } -.action-flag-7 { +.action-flag-6 { background-position: 0px -7670px; } -.action-flag-ghost { +.action-flag-7 { background-position: 0px -7687px; } -.action-fork { +.action-flag-ghost { background-position: 0px -7704px; } -.action-move { +.action-fork { background-position: 0px -7721px; } -.action-new { +.action-move { background-position: 0px -7738px; } -.action-preview { +.action-new { background-position: 0px -7755px; } -.action-subscribe-add { +.action-preview { background-position: 0px -7772px; } -.action-subscribe-auto { +.action-subscribe-add { background-position: 0px -7789px; } -.action-subscribe-delete { +.action-subscribe-auto { background-position: 0px -7806px; } -.action-unpublish { +.action-subscribe-delete { background-position: 0px -7823px; } -.action-world { +.action-unpublish { background-position: 0px -7840px; } -.remarkup-assist-b { +.action-world { background-position: 0px -7857px; } +.remarkup-assist-b { + background-position: 0px -7874px; +} + .remarkup-assist-code { - background-position: 0px -7872px; + background-position: 0px -7889px; } .remarkup-assist-i { - background-position: 0px -7887px; + background-position: 0px -7904px; } .remarkup-assist-image { - background-position: 0px -7902px; + background-position: 0px -7919px; } .remarkup-assist-ol { - background-position: 0px -7917px; + background-position: 0px -7934px; } .remarkup-assist-tag { - background-position: 0px -7932px; + background-position: 0px -7949px; } .remarkup-assist-tt { - background-position: 0px -7947px; + background-position: 0px -7964px; } .remarkup-assist-ul { - background-position: 0px -7962px; + background-position: 0px -7979px; } .remarkup-assist-help { - background-position: 0px -7977px; + background-position: 0px -7994px; } .remarkup-assist-table { - background-position: 0px -7992px; + background-position: 0px -8009px; } diff --git a/webroot/rsrc/image/autosprite.png b/webroot/rsrc/image/autosprite.png index 9648ecea6..feed650f3 100644 Binary files a/webroot/rsrc/image/autosprite.png and b/webroot/rsrc/image/autosprite.png differ