summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/dispatcher.js.es6
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-12-15 21:03:33 +0000
committerFatih Acet <acetfatih@gmail.com>2016-12-15 21:03:33 +0000
commitb01a830afedeacfa099be5c3332f012c3d3db02c (patch)
treefc701c5261a5dd0c9b3f061187c333d6e14ad1eb /app/assets/javascripts/dispatcher.js.es6
parent07c7976d16d5561613ee70022fa3d1086ba0bd92 (diff)
parent51b2ffaf7ecbfbc7604a38b66576af008aa8599f (diff)
downloadgitlab-ce-b01a830afedeacfa099be5c3332f012c3d3db02c.tar.gz
Merge branch '24877-bulk-edit-only-keeps-common-labels-when-searching' into 'master'
Improve bulk assignment This MR improves current implementation of Label dropdown when used for bulk assignment on issuable pages (/:namespace/:project/issues, /:namespace/:project/merge_requests) Previously this dropdown relied on `<input>` tags to get its active items and also to calculate items with indeterminate state. Relying on `<input>` tags is not enough when we want to set/get multiple states on a dropdown. For this case we want to get/set: - Marked items - Unmarked items that were initially marked - Unmarked items that were initially indeterminate - Items with indeterminate state. This MR makes the Label dropdown to save its own state as `data` so it will be easy to get and set whatever state we want no matter if the dropdown is filtering which is the issue that I initially wanted to solve as you can see in the following gif. **Before** ![2016-12-07_11.44.48](/uploads/cb697161b8b39cdee72fdbb95a531100/2016-12-07_11.44.48.gif) **After** ![2016-12-07_11.32.43](/uploads/338255a302de0dd1367474f33232d2a3/2016-12-07_11.32.43.gif) As you can see in the first gif the `bug` label is removed from the selected issues but the `enhancement` label should set but the `critical` should be kept. This is fixed on the next gif. Fixes #24877 See merge request !7765
Diffstat (limited to 'app/assets/javascripts/dispatcher.js.es6')
-rw-r--r--app/assets/javascripts/dispatcher.js.es68
1 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/dispatcher.js.es6 b/app/assets/javascripts/dispatcher.js.es6
index 7d588e8eee6..1ec950494ff 100644
--- a/app/assets/javascripts/dispatcher.js.es6
+++ b/app/assets/javascripts/dispatcher.js.es6
@@ -74,7 +74,9 @@
case 'projects:merge_requests:index':
case 'projects:issues:index':
Issuable.init();
- new gl.IssuableBulkActions();
+ new gl.IssuableBulkActions({
+ prefixId: page === 'projects:merge_requests:index' ? 'merge_request_' : 'issue_'
+ });
shortcut_handler = new ShortcutsNavigation();
break;
case 'projects:issues:show':
@@ -144,10 +146,6 @@
new ZenMode();
new MergedButtons();
break;
- case 'projects:merge_requests:index':
- shortcut_handler = new ShortcutsNavigation();
- Issuable.init();
- break;
case 'dashboard:activity':
new gl.Activities();
break;