mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Don't try to activate disabled items in dropdown menus
Summary: Fixes an issue where the user could click a disabled dropdown menu item and get an exception or some other nonsense. Instead, just don't activate anything. Test Plan: Clicked a disabled header, like "Members of project" in the policy dropdown. Reviewers: btrahan, va.multimoney, chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D7293
This commit is contained in:
parent
67cca8f7fa
commit
994823524b
2 changed files with 48 additions and 42 deletions
|
@ -3169,7 +3169,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'phabricator-dropdown-menu' =>
|
||||
array(
|
||||
'uri' => '/res/9e33be73/rsrc/js/core/DropdownMenu.js',
|
||||
'uri' => '/res/147ca011/rsrc/js/core/DropdownMenu.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -4309,7 +4309,7 @@ celerity_register_resource_map(array(
|
|||
'uri' => '/res/pkg/b2f506ea/core.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'8fafb027' =>
|
||||
'3a57ca2f' =>
|
||||
array(
|
||||
'name' => 'core.pkg.js',
|
||||
'symbols' =>
|
||||
|
@ -4354,7 +4354,7 @@ celerity_register_resource_map(array(
|
|||
37 => 'javelin-color',
|
||||
38 => 'javelin-fx',
|
||||
),
|
||||
'uri' => '/res/pkg/8fafb027/core.pkg.js',
|
||||
'uri' => '/res/pkg/3a57ca2f/core.pkg.js',
|
||||
'type' => 'js',
|
||||
),
|
||||
'4ccfeb47' =>
|
||||
|
@ -4522,16 +4522,16 @@ celerity_register_resource_map(array(
|
|||
'diffusion-icons-css' => 'c8ce2d88',
|
||||
'global-drag-and-drop-css' => 'b2f506ea',
|
||||
'inline-comment-summary-css' => '4dc2311c',
|
||||
'javelin-aphlict' => '8fafb027',
|
||||
'javelin-aphlict' => '3a57ca2f',
|
||||
'javelin-behavior' => '9564fa17',
|
||||
'javelin-behavior-aphlict-dropdown' => '8fafb027',
|
||||
'javelin-behavior-aphlict-listen' => '8fafb027',
|
||||
'javelin-behavior-aphront-basic-tokenizer' => '8fafb027',
|
||||
'javelin-behavior-aphlict-dropdown' => '3a57ca2f',
|
||||
'javelin-behavior-aphlict-listen' => '3a57ca2f',
|
||||
'javelin-behavior-aphront-basic-tokenizer' => '3a57ca2f',
|
||||
'javelin-behavior-aphront-drag-and-drop-textarea' => '5e9e5c4e',
|
||||
'javelin-behavior-aphront-form-disable-on-submit' => '8fafb027',
|
||||
'javelin-behavior-aphront-form-disable-on-submit' => '3a57ca2f',
|
||||
'javelin-behavior-audit-preview' => '96909266',
|
||||
'javelin-behavior-dark-console' => '4ccfeb47',
|
||||
'javelin-behavior-device' => '8fafb027',
|
||||
'javelin-behavior-device' => '3a57ca2f',
|
||||
'javelin-behavior-differential-accept-with-errors' => '5e9e5c4e',
|
||||
'javelin-behavior-differential-add-reviewers-and-ccs' => '5e9e5c4e',
|
||||
'javelin-behavior-differential-comment-jump' => '5e9e5c4e',
|
||||
|
@ -4547,37 +4547,37 @@ celerity_register_resource_map(array(
|
|||
'javelin-behavior-diffusion-commit-graph' => '96909266',
|
||||
'javelin-behavior-diffusion-pull-lastmodified' => '96909266',
|
||||
'javelin-behavior-error-log' => '4ccfeb47',
|
||||
'javelin-behavior-global-drag-and-drop' => '8fafb027',
|
||||
'javelin-behavior-history-install' => '8fafb027',
|
||||
'javelin-behavior-konami' => '8fafb027',
|
||||
'javelin-behavior-lightbox-attachments' => '8fafb027',
|
||||
'javelin-behavior-global-drag-and-drop' => '3a57ca2f',
|
||||
'javelin-behavior-history-install' => '3a57ca2f',
|
||||
'javelin-behavior-konami' => '3a57ca2f',
|
||||
'javelin-behavior-lightbox-attachments' => '3a57ca2f',
|
||||
'javelin-behavior-load-blame' => '5e9e5c4e',
|
||||
'javelin-behavior-maniphest-batch-selector' => '0a694954',
|
||||
'javelin-behavior-maniphest-subpriority-editor' => '0a694954',
|
||||
'javelin-behavior-maniphest-transaction-controls' => '0a694954',
|
||||
'javelin-behavior-maniphest-transaction-expand' => '0a694954',
|
||||
'javelin-behavior-maniphest-transaction-preview' => '0a694954',
|
||||
'javelin-behavior-phabricator-active-nav' => '8fafb027',
|
||||
'javelin-behavior-phabricator-autofocus' => '8fafb027',
|
||||
'javelin-behavior-phabricator-gesture' => '8fafb027',
|
||||
'javelin-behavior-phabricator-hovercards' => '8fafb027',
|
||||
'javelin-behavior-phabricator-keyboard-shortcuts' => '8fafb027',
|
||||
'javelin-behavior-phabricator-nav' => '8fafb027',
|
||||
'javelin-behavior-phabricator-active-nav' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-autofocus' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-gesture' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-hovercards' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-keyboard-shortcuts' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-nav' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-object-selector' => '5e9e5c4e',
|
||||
'javelin-behavior-phabricator-oncopy' => '8fafb027',
|
||||
'javelin-behavior-phabricator-remarkup-assist' => '8fafb027',
|
||||
'javelin-behavior-phabricator-reveal-content' => '8fafb027',
|
||||
'javelin-behavior-phabricator-search-typeahead' => '8fafb027',
|
||||
'javelin-behavior-phabricator-tooltips' => '8fafb027',
|
||||
'javelin-behavior-phabricator-watch-anchor' => '8fafb027',
|
||||
'javelin-behavior-refresh-csrf' => '8fafb027',
|
||||
'javelin-behavior-phabricator-oncopy' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-remarkup-assist' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-reveal-content' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-search-typeahead' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-tooltips' => '3a57ca2f',
|
||||
'javelin-behavior-phabricator-watch-anchor' => '3a57ca2f',
|
||||
'javelin-behavior-refresh-csrf' => '3a57ca2f',
|
||||
'javelin-behavior-repository-crossreference' => '5e9e5c4e',
|
||||
'javelin-behavior-toggle-class' => '8fafb027',
|
||||
'javelin-behavior-workflow' => '8fafb027',
|
||||
'javelin-color' => '8fafb027',
|
||||
'javelin-behavior-toggle-class' => '3a57ca2f',
|
||||
'javelin-behavior-workflow' => '3a57ca2f',
|
||||
'javelin-color' => '3a57ca2f',
|
||||
'javelin-dom' => '9564fa17',
|
||||
'javelin-event' => '9564fa17',
|
||||
'javelin-fx' => '8fafb027',
|
||||
'javelin-fx' => '3a57ca2f',
|
||||
'javelin-history' => '9564fa17',
|
||||
'javelin-install' => '9564fa17',
|
||||
'javelin-json' => '9564fa17',
|
||||
|
@ -4599,36 +4599,36 @@ celerity_register_resource_map(array(
|
|||
'maniphest-task-summary-css' => '49898640',
|
||||
'phabricator-action-list-view-css' => 'b2f506ea',
|
||||
'phabricator-application-launch-view-css' => 'b2f506ea',
|
||||
'phabricator-busy' => '8fafb027',
|
||||
'phabricator-busy' => '3a57ca2f',
|
||||
'phabricator-content-source-view-css' => '4dc2311c',
|
||||
'phabricator-core-css' => 'b2f506ea',
|
||||
'phabricator-crumbs-view-css' => 'b2f506ea',
|
||||
'phabricator-drag-and-drop-file-upload' => '5e9e5c4e',
|
||||
'phabricator-dropdown-menu' => '8fafb027',
|
||||
'phabricator-file-upload' => '8fafb027',
|
||||
'phabricator-dropdown-menu' => '3a57ca2f',
|
||||
'phabricator-file-upload' => '3a57ca2f',
|
||||
'phabricator-filetree-view-css' => 'b2f506ea',
|
||||
'phabricator-flag-css' => 'b2f506ea',
|
||||
'phabricator-hovercard' => '8fafb027',
|
||||
'phabricator-hovercard' => '3a57ca2f',
|
||||
'phabricator-jump-nav' => 'b2f506ea',
|
||||
'phabricator-keyboard-shortcut' => '8fafb027',
|
||||
'phabricator-keyboard-shortcut-manager' => '8fafb027',
|
||||
'phabricator-keyboard-shortcut' => '3a57ca2f',
|
||||
'phabricator-keyboard-shortcut-manager' => '3a57ca2f',
|
||||
'phabricator-main-menu-view' => 'b2f506ea',
|
||||
'phabricator-menu-item' => '8fafb027',
|
||||
'phabricator-menu-item' => '3a57ca2f',
|
||||
'phabricator-nav-view-css' => 'b2f506ea',
|
||||
'phabricator-notification' => '8fafb027',
|
||||
'phabricator-notification' => '3a57ca2f',
|
||||
'phabricator-notification-css' => 'b2f506ea',
|
||||
'phabricator-notification-menu-css' => 'b2f506ea',
|
||||
'phabricator-object-selector-css' => '4dc2311c',
|
||||
'phabricator-phtize' => '8fafb027',
|
||||
'phabricator-prefab' => '8fafb027',
|
||||
'phabricator-phtize' => '3a57ca2f',
|
||||
'phabricator-prefab' => '3a57ca2f',
|
||||
'phabricator-project-tag-css' => '49898640',
|
||||
'phabricator-remarkup-css' => 'b2f506ea',
|
||||
'phabricator-shaped-request' => '5e9e5c4e',
|
||||
'phabricator-side-menu-view-css' => 'b2f506ea',
|
||||
'phabricator-standard-page-view' => 'b2f506ea',
|
||||
'phabricator-tag-view-css' => 'b2f506ea',
|
||||
'phabricator-textareautils' => '8fafb027',
|
||||
'phabricator-tooltip' => '8fafb027',
|
||||
'phabricator-textareautils' => '3a57ca2f',
|
||||
'phabricator-tooltip' => '3a57ca2f',
|
||||
'phabricator-transaction-view-css' => 'b2f506ea',
|
||||
'phabricator-zindex-css' => 'b2f506ea',
|
||||
'phui-button-css' => 'b2f506ea',
|
||||
|
|
|
@ -118,6 +118,12 @@ JX.install('PhabricatorDropdownMenu', {
|
|||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.getDisabled()) {
|
||||
e.prevent();
|
||||
return;
|
||||
}
|
||||
|
||||
item.select();
|
||||
e.prevent();
|
||||
this.close();
|
||||
|
|
Loading…
Reference in a new issue