Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13977491
D17222.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D17222.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -10,7 +10,7 @@
'conpherence.pkg.css' => '0b64e988',
'conpherence.pkg.js' => '6249a1cf',
'core.pkg.css' => 'e75e4f9d',
- 'core.pkg.js' => 'f70cb91f',
+ 'core.pkg.js' => '2291d3b2',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '9535a7e6',
'differential.pkg.js' => 'ddfeb49b',
@@ -443,7 +443,7 @@
'rsrc/js/application/projects/WorkboardCard.js' => 'c587b80f',
'rsrc/js/application/projects/WorkboardColumn.js' => '21df4ff5',
'rsrc/js/application/projects/WorkboardController.js' => '55baf5ed',
- 'rsrc/js/application/projects/behavior-project-boards.js' => '14a1faae',
+ 'rsrc/js/application/projects/behavior-project-boards.js' => '93ae974f',
'rsrc/js/application/projects/behavior-project-create.js' => '065227cc',
'rsrc/js/application/projects/behavior-reorder-columns.js' => 'e1d25dfb',
'rsrc/js/application/releeph/releeph-preview-branch.js' => 'b2b4fbaf',
@@ -534,14 +534,14 @@
'rsrc/js/core/behavior-watch-anchor.js' => '9f36c42d',
'rsrc/js/core/behavior-workflow.js' => '0a3f3021',
'rsrc/js/core/phtize.js' => 'd254d646',
- 'rsrc/js/phui/behavior-phui-dropdown-menu.js' => '8744dfd1',
+ 'rsrc/js/phui/behavior-phui-dropdown-menu.js' => 'b95d6f7d',
'rsrc/js/phui/behavior-phui-file-upload.js' => 'b003d4fb',
'rsrc/js/phui/behavior-phui-submenu.js' => 'a6f7a73b',
'rsrc/js/phui/behavior-phui-tab-group.js' => '0a0b10e9',
'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8',
- 'rsrc/js/phuix/PHUIXActionView.js' => '9cc178ed',
+ 'rsrc/js/phuix/PHUIXActionView.js' => 'b3465b9b',
'rsrc/js/phuix/PHUIXAutocomplete.js' => '6d86ce8b',
- 'rsrc/js/phuix/PHUIXDropdownMenu.js' => '82e270da',
+ 'rsrc/js/phuix/PHUIXDropdownMenu.js' => '8018ee50',
'rsrc/js/phuix/PHUIXFormControl.js' => 'bbece68d',
'rsrc/js/phuix/PHUIXIconView.js' => 'bff6884b',
),
@@ -687,14 +687,14 @@
'javelin-behavior-phabricator-watch-anchor' => '9f36c42d',
'javelin-behavior-pholio-mock-edit' => 'bee502c8',
'javelin-behavior-pholio-mock-view' => 'fbe497e7',
- 'javelin-behavior-phui-dropdown-menu' => '8744dfd1',
+ 'javelin-behavior-phui-dropdown-menu' => 'b95d6f7d',
'javelin-behavior-phui-file-upload' => 'b003d4fb',
'javelin-behavior-phui-hovercards' => 'bcaccd64',
'javelin-behavior-phui-submenu' => 'a6f7a73b',
'javelin-behavior-phui-tab-group' => '0a0b10e9',
'javelin-behavior-policy-control' => 'd0c516d5',
'javelin-behavior-policy-rule-editor' => '5e9f347c',
- 'javelin-behavior-project-boards' => '14a1faae',
+ 'javelin-behavior-project-boards' => '93ae974f',
'javelin-behavior-project-create' => '065227cc',
'javelin-behavior-quicksand-blacklist' => '7927a7d3',
'javelin-behavior-read-only-warning' => 'ba158207',
@@ -898,9 +898,9 @@
'phui-workcard-view-css' => 'cca5fa92',
'phui-workpanel-view-css' => 'a3a63478',
'phuix-action-list-view' => 'b5c256b8',
- 'phuix-action-view' => '9cc178ed',
+ 'phuix-action-view' => 'b3465b9b',
'phuix-autocomplete' => '6d86ce8b',
- 'phuix-dropdown-menu' => '82e270da',
+ 'phuix-dropdown-menu' => '8018ee50',
'phuix-form-control-view' => 'bbece68d',
'phuix-icon-view' => 'bff6884b',
'policy-css' => '957ea14c',
@@ -1044,15 +1044,6 @@
'javelin-dom',
'javelin-history',
),
- '14a1faae' => array(
- 'javelin-behavior',
- 'javelin-dom',
- 'javelin-util',
- 'javelin-vector',
- 'javelin-stratcom',
- 'javelin-workflow',
- 'javelin-workboard-controller',
- ),
'185bbd53' => array(
'javelin-install',
),
@@ -1519,17 +1510,17 @@
'javelin-behavior',
'javelin-history',
),
- '805b806a' => array(
- 'javelin-magical-init',
+ '8018ee50' => array(
'javelin-install',
'javelin-util',
+ 'javelin-dom',
'javelin-vector',
'javelin-stratcom',
),
- '82e270da' => array(
+ '805b806a' => array(
+ 'javelin-magical-init',
'javelin-install',
'javelin-util',
- 'javelin-dom',
'javelin-vector',
'javelin-stratcom',
),
@@ -1561,12 +1552,6 @@
'phabricator-tooltip',
'changeset-view-manager',
),
- '8744dfd1' => array(
- 'javelin-behavior',
- 'javelin-stratcom',
- 'javelin-dom',
- 'phuix-dropdown-menu',
- ),
'88236f00' => array(
'javelin-behavior',
'phabricator-keyboard-shortcut',
@@ -1639,6 +1624,15 @@
'javelin-stratcom',
'javelin-dom',
),
+ '93ae974f' => array(
+ 'javelin-behavior',
+ 'javelin-dom',
+ 'javelin-util',
+ 'javelin-vector',
+ 'javelin-stratcom',
+ 'javelin-workflow',
+ 'javelin-workboard-controller',
+ ),
'93d0c9e3' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -1699,11 +1693,6 @@
'javelin-workflow',
'javelin-stratcom',
),
- '9cc178ed' => array(
- 'javelin-install',
- 'javelin-dom',
- 'javelin-util',
- ),
'9d9685d6' => array(
'phui-oi-list-view-css',
),
@@ -1849,6 +1838,11 @@
'javelin-uri',
'javelin-request',
),
+ 'b3465b9b' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'javelin-util',
+ ),
'b3a4b884' => array(
'javelin-behavior',
'phabricator-prefab',
@@ -1901,6 +1895,12 @@
'javelin-json',
'phabricator-draggable-list',
),
+ 'b95d6f7d' => array(
+ 'javelin-behavior',
+ 'javelin-stratcom',
+ 'javelin-dom',
+ 'phuix-dropdown-menu',
+ ),
'ba158207' => array(
'javelin-behavior',
'javelin-uri',
diff --git a/webroot/rsrc/js/application/projects/behavior-project-boards.js b/webroot/rsrc/js/application/projects/behavior-project-boards.js
--- a/webroot/rsrc/js/application/projects/behavior-project-boards.js
+++ b/webroot/rsrc/js/application/projects/behavior-project-boards.js
@@ -34,13 +34,6 @@
data.menu = new JX.PHUIXDropdownMenu(button);
data.menu.setContent(list);
data.menu.open();
-
- JX.DOM.listen(list, 'click', 'tag:a', function(e) {
- if (!e.isNormalClick()) {
- return;
- }
- data.menu.close();
- });
});
JX.Stratcom.listen(
diff --git a/webroot/rsrc/js/phui/behavior-phui-dropdown-menu.js b/webroot/rsrc/js/phui/behavior-phui-dropdown-menu.js
--- a/webroot/rsrc/js/phui/behavior-phui-dropdown-menu.js
+++ b/webroot/rsrc/js/phui/behavior-phui-dropdown-menu.js
@@ -42,20 +42,6 @@
});
data.menu.open();
-
- JX.DOM.listen(list, 'click', 'tag:a', function(e) {
- if (!e.isNormalClick()) {
- return;
- }
-
- // If this item opens a submenu, we don't want to close the current
- // menu. One submenu is "Edit Related Objects..." on mobile.
- if (JX.Stratcom.hasSigil(e.getTarget(), 'keep-open')) {
- return;
- }
-
- data.menu.close();
- });
});
});
diff --git a/webroot/rsrc/js/phuix/PHUIXActionView.js b/webroot/rsrc/js/phuix/PHUIXActionView.js
--- a/webroot/rsrc/js/phuix/PHUIXActionView.js
+++ b/webroot/rsrc/js/phuix/PHUIXActionView.js
@@ -96,6 +96,8 @@
className: classes.join(' ')
};
this._node = JX.$N('li', attr, content);
+
+ JX.Stratcom.addSigil(this._node, 'phuix-action-view');
}
return this._node;
diff --git a/webroot/rsrc/js/phuix/PHUIXDropdownMenu.js b/webroot/rsrc/js/phuix/PHUIXDropdownMenu.js
--- a/webroot/rsrc/js/phuix/PHUIXDropdownMenu.js
+++ b/webroot/rsrc/js/phuix/PHUIXDropdownMenu.js
@@ -40,6 +40,12 @@
JX.Stratcom.listen('phuix.dropdown.open', null, JX.bind(this, this.close));
JX.Stratcom.listen('keydown', null, JX.bind(this, this._onkey));
+
+ JX.DOM.listen(
+ this._getMenuNode(),
+ 'click',
+ 'tag:a',
+ JX.bind(this, this._onlink));
},
events: ['open', 'close'],
@@ -112,6 +118,28 @@
e.prevent();
},
+ _onlink: function(e) {
+ if (!e.isNormalClick()) {
+ return;
+ }
+
+ // If this action was built dynamically with PHUIXActionView, don't
+ // do anything by default. The caller is repsonsible for installing a
+ // handler if they want to react to clicks.
+ if (e.getNode('phuix-action-view')) {
+ return;
+ }
+
+ // If this item opens a submenu, we don't want to close the current
+ // menu. One submenu is "Edit Related Objects..." on mobile.
+ var link = e.getNode('tag:a');
+ if (JX.Stratcom.hasSigil(link, 'keep-open')) {
+ return;
+ }
+
+ this.close();
+ },
+
_onanyclick : function(e) {
if (!this._open) {
return;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 19, 6:49 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6733454
Default Alt Text
D17222.diff (8 KB)
Attached To
Mode
D17222: Attempt to make dropdown item actions more consistent
Attached
Detach File
Event Timeline
Log In to Comment