Page MenuHomePhabricator

D8977.id21296.diff
No OneTemporary

D8977.id21296.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,8 +7,8 @@
return array(
'names' =>
array(
- 'core.pkg.css' => 'f6243b70',
- 'core.pkg.js' => '417722ff',
+ 'core.pkg.css' => 'fcca0300',
+ 'core.pkg.js' => 'e60bc550',
'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => '8a064eb7',
'differential.pkg.js' => 'a2f45b5f',
@@ -108,7 +108,7 @@
'rsrc/css/core/core.css' => '7dff07c3',
'rsrc/css/core/remarkup.css' => '80c3a48c',
'rsrc/css/core/syntax.css' => '3c18c1cb',
- 'rsrc/css/core/z-index.css' => 'e057ae95',
+ 'rsrc/css/core/z-index.css' => 'efb673ac',
'rsrc/css/diviner/diviner-shared.css' => '38813222',
'rsrc/css/font/font-awesome.css' => '62bc244d',
'rsrc/css/font/font-glyphicons-halflings.css' => 'c4c1c6b6',
@@ -126,7 +126,7 @@
'rsrc/css/phui/calendar/phui-calendar-month.css' => 'a92e47d2',
'rsrc/css/phui/calendar/phui-calendar.css' => '5e1ad989',
'rsrc/css/phui/phui-box.css' => '7b3a2eed',
- 'rsrc/css/phui/phui-button.css' => 'c43a9c3f',
+ 'rsrc/css/phui/phui-button.css' => '73b33963',
'rsrc/css/phui/phui-document.css' => '3b078dc0',
'rsrc/css/phui/phui-feed-story.css' => '3a59c2cf',
'rsrc/css/phui/phui-fontkit.css' => 'de84aa4a',
@@ -431,8 +431,6 @@
'rsrc/js/core/Busy.js' => '6453c869',
'rsrc/js/core/DragAndDropFileUpload.js' => 'ae6abfba',
'rsrc/js/core/DraggableList.js' => '1681c4d4',
- 'rsrc/js/core/DropdownMenu.js' => 'fb342e18',
- 'rsrc/js/core/DropdownMenuItem.js' => '0f386ef4',
'rsrc/js/core/FileUpload.js' => 'a4ae61bf',
'rsrc/js/core/Hovercard.js' => '4f344388',
'rsrc/js/core/KeyboardShortcut.js' => '1ae869f2',
@@ -694,7 +692,6 @@
'phabricator-crumbs-view-css' => '0222cbe0',
'phabricator-drag-and-drop-file-upload' => 'ae6abfba',
'phabricator-draggable-list' => '1681c4d4',
- 'phabricator-dropdown-menu' => 'fb342e18',
'phabricator-fatal-config-template-css' => '25d446d6',
'phabricator-feed-css' => '0d17c209',
'phabricator-file-upload' => 'a4ae61bf',
@@ -706,7 +703,6 @@
'phabricator-keyboard-shortcut' => '1ae869f2',
'phabricator-keyboard-shortcut-manager' => 'ad7a69ca',
'phabricator-main-menu-view' => '0a599177',
- 'phabricator-menu-item' => '0f386ef4',
'phabricator-nav-view-css' => '80e60fc1',
'phabricator-notification' => '0c6946e7',
'phabricator-notification-css' => 'ef2c9b34',
@@ -738,7 +734,7 @@
'phabricator-uiexample-reactor-select' => '189e4fe3',
'phabricator-uiexample-reactor-sendclass' => 'bf97561d',
'phabricator-uiexample-reactor-sendproperties' => '551add57',
- 'phabricator-zindex-css' => 'e057ae95',
+ 'phabricator-zindex-css' => 'efb673ac',
'phame-css' => '19ecc703',
'pholio-css' => '2fa97dbe',
'pholio-edit-css' => 'b9e59b6d',
@@ -748,7 +744,7 @@
'phrequent-css' => 'ffc185ad',
'phriction-document-css' => '7d7f0071',
'phui-box-css' => '7b3a2eed',
- 'phui-button-css' => 'c43a9c3f',
+ 'phui-button-css' => '73b33963',
'phui-calendar-css' => '5e1ad989',
'phui-calendar-day-css' => 'de035c8a',
'phui-calendar-list-css' => 'c1d0ca59',
@@ -901,11 +897,6 @@
1 => 'javelin-stratcom',
2 => 'javelin-dom',
),
- '0f386ef4' =>
- array(
- 0 => 'javelin-install',
- 1 => 'javelin-dom',
- ),
'0f764c35' =>
array(
0 => 'javelin-install',
@@ -1975,15 +1966,6 @@
4 => 'javelin-stratcom',
5 => 'phabricator-shaped-request',
),
- 'fb342e18' =>
- array(
- 0 => 'javelin-install',
- 1 => 'javelin-util',
- 2 => 'javelin-dom',
- 3 => 'javelin-vector',
- 4 => 'javelin-stratcom',
- 5 => 'phabricator-menu-item',
- ),
'fbbce3bf' =>
array(
0 => 'phabricator-busy',
@@ -2113,36 +2095,37 @@
6 => 'javelin-behavior-refresh-csrf',
7 => 'javelin-behavior-phabricator-watch-anchor',
8 => 'javelin-behavior-phabricator-autofocus',
- 9 => 'phabricator-menu-item',
- 10 => 'phabricator-dropdown-menu',
- 11 => 'phabricator-phtize',
- 12 => 'javelin-behavior-phabricator-oncopy',
- 13 => 'phabricator-tooltip',
- 14 => 'javelin-behavior-phabricator-tooltips',
- 15 => 'phabricator-prefab',
- 16 => 'javelin-behavior-device',
- 17 => 'javelin-behavior-toggle-class',
- 18 => 'javelin-behavior-lightbox-attachments',
- 19 => 'phabricator-busy',
- 20 => 'javelin-aphlict',
- 21 => 'phabricator-notification',
- 22 => 'javelin-behavior-aphlict-listen',
- 23 => 'javelin-behavior-phabricator-search-typeahead',
- 24 => 'javelin-behavior-konami',
- 25 => 'javelin-behavior-aphlict-dropdown',
- 26 => 'javelin-behavior-history-install',
- 27 => 'javelin-behavior-phabricator-gesture',
- 28 => 'javelin-behavior-phabricator-active-nav',
- 29 => 'javelin-behavior-phabricator-nav',
- 30 => 'javelin-behavior-phabricator-remarkup-assist',
- 31 => 'phabricator-textareautils',
- 32 => 'phabricator-file-upload',
- 33 => 'javelin-behavior-global-drag-and-drop',
- 34 => 'javelin-behavior-phabricator-reveal-content',
- 35 => 'phabricator-hovercard',
- 36 => 'javelin-behavior-phabricator-hovercards',
- 37 => 'javelin-color',
- 38 => 'javelin-fx',
+ 9 => 'phuix-dropdown-menu',
+ 10 => 'phuix-action-list-view',
+ 11 => 'phuix-action-view',
+ 12 => 'phabricator-phtize',
+ 13 => 'javelin-behavior-phabricator-oncopy',
+ 14 => 'phabricator-tooltip',
+ 15 => 'javelin-behavior-phabricator-tooltips',
+ 16 => 'phabricator-prefab',
+ 17 => 'javelin-behavior-device',
+ 18 => 'javelin-behavior-toggle-class',
+ 19 => 'javelin-behavior-lightbox-attachments',
+ 20 => 'phabricator-busy',
+ 21 => 'javelin-aphlict',
+ 22 => 'phabricator-notification',
+ 23 => 'javelin-behavior-aphlict-listen',
+ 24 => 'javelin-behavior-phabricator-search-typeahead',
+ 25 => 'javelin-behavior-konami',
+ 26 => 'javelin-behavior-aphlict-dropdown',
+ 27 => 'javelin-behavior-history-install',
+ 28 => 'javelin-behavior-phabricator-gesture',
+ 29 => 'javelin-behavior-phabricator-active-nav',
+ 30 => 'javelin-behavior-phabricator-nav',
+ 31 => 'javelin-behavior-phabricator-remarkup-assist',
+ 32 => 'phabricator-textareautils',
+ 33 => 'phabricator-file-upload',
+ 34 => 'javelin-behavior-global-drag-and-drop',
+ 35 => 'javelin-behavior-phabricator-reveal-content',
+ 36 => 'phabricator-hovercard',
+ 37 => 'javelin-behavior-phabricator-hovercards',
+ 38 => 'javelin-color',
+ 39 => 'javelin-fx',
),
'darkconsole.pkg.js' =>
array(
diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php
--- a/resources/celerity/packages.php
+++ b/resources/celerity/packages.php
@@ -33,8 +33,9 @@
'javelin-behavior-refresh-csrf',
'javelin-behavior-phabricator-watch-anchor',
'javelin-behavior-phabricator-autofocus',
- 'phabricator-menu-item',
- 'phabricator-dropdown-menu',
+ 'phuix-dropdown-menu',
+ 'phuix-action-list-view',
+ 'phuix-action-view',
'phabricator-phtize',
'javelin-behavior-phabricator-oncopy',
'phabricator-tooltip',
diff --git a/webroot/rsrc/css/core/z-index.css b/webroot/rsrc/css/core/z-index.css
--- a/webroot/rsrc/css/core/z-index.css
+++ b/webroot/rsrc/css/core/z-index.css
@@ -133,7 +133,6 @@
z-index: 20;
}
-.dropdown-menu-frame,
.phuix-dropdown-menu {
z-index: 32;
}
diff --git a/webroot/rsrc/css/phui/phui-button.css b/webroot/rsrc/css/phui/phui-button.css
--- a/webroot/rsrc/css/phui/phui-button.css
+++ b/webroot/rsrc/css/phui/phui-button.css
@@ -166,7 +166,6 @@
text-decoration: underline;
}
-.dropdown-menu-frame,
.phuix-dropdown-menu {
position: absolute;
width: 240px;
@@ -178,25 +177,6 @@
border-bottom-color: {$greyborder};
}
-.dropdown-menu-frame .dropdown-menu-item {
- display: block;
- padding: 2px 10px;
- clear: both;
- line-height: 20px;
- color: {$darkgreytext};
- white-space: nowrap;
-}
-
-.dropdown-menu-frame .dropdown-menu-item-disabled {
- color: {$lightgreytext};
-}
-
-.dropdown-menu-frame .phui-icon-view {
- display: inline-block;
- padding: 0;
- margin: 2px 6px -2px 4px;
-}
-
a.policy-control {
width: 240px;
text-align: left;
@@ -213,17 +193,6 @@
left: 7px;
}
-.dropdown-menu-frame .dropdown-menu-item-selected {
- background: {$lightblue};
-}
-
-.dropdown-menu-frame a:hover {
- background: {$blue};
- color: white;
- cursor: pointer;
- text-decoration: none;
-}
-
a.toggle {
display: inline-block;
padding: 4px 8px;
diff --git a/webroot/rsrc/js/core/DropdownMenu.js b/webroot/rsrc/js/core/DropdownMenu.js
deleted file mode 100644
--- a/webroot/rsrc/js/core/DropdownMenu.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * @requires javelin-install
- * javelin-util
- * javelin-dom
- * javelin-vector
- * javelin-stratcom
- * phabricator-menu-item
- * @provides phabricator-dropdown-menu
- * @javelin
- */
-
-JX.install('PhabricatorDropdownMenu', {
-
- construct : function(node) {
- this._node = node;
- this._items = [];
- this._menu = JX.$N('div', { className : 'dropdown-menu-frame' });
-
- JX.DOM.listen(
- this._node,
- 'click',
- null,
- JX.bind(this, this._onclick));
-
- JX.DOM.listen(
- this._menu,
- 'click',
- null,
- JX.bind(this, this._onclickitem));
-
- JX.Stratcom.listen(
- 'mousedown',
- null,
- JX.bind(this, this._onclickglobal));
-
- JX.Stratcom.listen(
- 'resize',
- null,
- JX.bind(this, this._onresize));
-
- JX.PhabricatorDropdownMenu.listen(
- 'open',
- JX.bind(this, this.close));
- },
-
- events : ['open'],
-
- properties : {
- width : null
- },
-
- members : {
- _node : null,
- _menu : null,
- _open : false,
- _items : null,
- _alignRight : true,
-
- // By default, the dropdown will have its right edge aligned with the
- // right edge of _node. Making this false does left edge alignment
- toggleAlignDropdownRight : function (bool) {
- this._alignRight = bool;
- },
-
- open : function() {
- if (this._open) {
- return;
- }
-
- this.invoke('open');
-
- var menu_items = [];
- for (var ii = 0; ii < this._items.length; ii++) {
- menu_items.push(this._items[ii].render());
- }
- JX.DOM.setContent(this._menu, menu_items);
-
- this._open = true;
- this._show();
-
- return this;
- },
-
- close : function() {
- if (!this._open) {
- return;
- }
- this._open = false;
- this._hide();
-
- return this;
- },
-
- clear : function() {
- this._items = [];
- return this;
- },
-
- addItem : function(item) {
- if (__DEV__) {
- if (!(item instanceof JX.PhabricatorMenuItem)) {
- JX.$E(
- 'JX.DropdownMenu.addItem(<junk>): ' +
- 'item must be a JX.PhabricatorMenuItem.');
- }
- }
- this._items.push(item);
- return this;
- },
-
- _onclick : function(e) {
- if (this._open) {
- this.close();
- } else {
- this.open();
- }
- e.prevent();
- },
-
- _onclickitem : function(e) {
- var item = JX.Stratcom.getData(e.getTarget()).item;
- if (!item) {
- return;
- }
-
- if (item.getDisabled()) {
- e.prevent();
- return;
- }
-
- item.select();
- e.prevent();
- this.close();
- },
-
- _onclickglobal : function(e) {
- if (!this._open) {
- return;
- }
-
- if (JX.Stratcom.pass(e)) {
- return;
- }
-
- var t = e.getTarget();
- while (t) {
- if (t == this._menu || t == this._node) {
- return;
- }
- t = t.parentNode;
- }
-
- this.close();
- },
-
- _show : function() {
- document.body.appendChild(this._menu);
-
- if (this.getWidth()) {
- new JX.Vector(this.getWidth(), null).setDim(this._menu);
- }
-
- this._onresize();
-
- JX.DOM.alterClass(this._node, 'dropdown-open', true);
- },
-
- _onresize : function() {
- if (!this._open) {
- return;
- }
-
- var m = JX.Vector.getDim(this._menu);
-
- var v = JX.$V(this._node);
- var d = JX.Vector.getDim(this._node);
- if (this._alignRight) {
- v = v.add(d)
- .add(JX.$V(-m.x, 0));
- } else {
- v = v.add(0, d.y);
- }
- v.setPos(this._menu);
- },
-
- _hide : function() {
- JX.DOM.remove(this._menu);
- JX.DOM.alterClass(this._node, 'dropdown-open', false);
- }
-
- }
-});
diff --git a/webroot/rsrc/js/core/DropdownMenuItem.js b/webroot/rsrc/js/core/DropdownMenuItem.js
deleted file mode 100644
--- a/webroot/rsrc/js/core/DropdownMenuItem.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * @requires javelin-install
- * javelin-dom
- * @provides phabricator-menu-item
- * @javelin
- */
-
-JX.install('PhabricatorMenuItem', {
-
- construct : function(name, action, href) {
- this.setName(name);
- this.setHref(href || '#');
- this._action = action;
- },
-
- members : {
- _action : null,
-
- render : function() {
- var classes = [];
- classes.push('dropdown-menu-item');
-
- if (this.getSelected()) {
- classes.push('dropdown-menu-item-selected');
- }
-
- if (this.getDisabled()) {
- classes.push('dropdown-menu-item-disabled');
- }
-
- var attrs = {
- href: this.getHref(),
- meta: { item: this },
- className: classes.join(' ')
- };
-
- if (this.getDisabled()) {
- return JX.$N('span', attrs, this.getName());
- } else {
- return JX.$N('a', attrs, this.getName());
- }
- },
-
- select : function() {
- this._action();
- }
- },
-
- properties : {
- name: '',
- href: '',
- disabled: false,
- selected: false
- }
-
-});

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 1, 8:58 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6756003
Default Alt Text
D8977.id21296.diff (13 KB)

Event Timeline