diff options
author | Ruben Davila <rdavila84@gmail.com> | 2016-09-09 18:39:22 +0300 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2016-09-09 18:39:22 +0300 |
commit | 2cad277d74b6a7367ac11b94652a6efc18eda850 (patch) | |
tree | c3720b686e5d556f46d1c09f9b30b073966d7c48 /app/assets/javascripts/issues-bulk-assignment.js | |
parent | e36534dbd2045df23d12627f15c64f6dc523149b (diff) | |
parent | 2b3a1da6f3ceb4c78c055f14dfe93dbe818366d3 (diff) |
Merge branch 'master' into 8-12-stable
Diffstat (limited to 'app/assets/javascripts/issues-bulk-assignment.js')
-rw-r--r-- | app/assets/javascripts/issues-bulk-assignment.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/issues-bulk-assignment.js b/app/assets/javascripts/issues-bulk-assignment.js index 8ca90490426..62a7fc9a06c 100644 --- a/app/assets/javascripts/issues-bulk-assignment.js +++ b/app/assets/javascripts/issues-bulk-assignment.js @@ -1,14 +1,17 @@ (function() { this.IssuableBulkActions = (function() { function IssuableBulkActions(opts) { + // Set defaults var ref, ref1, ref2; if (opts == null) { opts = {}; } this.container = (ref = opts.container) != null ? ref : $('.content'), this.form = (ref1 = opts.form) != null ? ref1 : this.getElement('.bulk-update'), this.issues = (ref2 = opts.issues) != null ? ref2 : this.getElement('.issuable-list > li'); + // Save instance this.form.data('bulkActions', this); this.willUpdateLabels = false; this.bindEvents(); + // Fixes bulk-assign not working when navigating through pages Issuable.initChecks(); } @@ -86,6 +89,7 @@ ref1 = this.getLabelsFromSelection(); for (j = 0, len1 = ref1.length; j < len1; j++) { id = ref1[j]; + // Only the ones that we are not going to keep if (labelsToKeep.indexOf(id) === -1) { result.push(id); } @@ -147,6 +151,8 @@ indeterminatedLabels = this.getUnmarkedIndeterminedLabels(); labelsToApply = this.getLabelsToApply(); indeterminatedLabels.map(function(id) { + // We need to exclude label IDs that will be applied + // By not doing this will cause issues from selection to not add labels at all if (labelsToApply.indexOf(id) === -1) { return result.push(id); } |