Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
618cf373
Commit
618cf373
authored
Jun 22, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply labels only if we picked a label from the dropdown
parent
1e96e7f6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
app/assets/javascripts/issues-bulk-assignment.js.coffee
app/assets/javascripts/issues-bulk-assignment.js.coffee
+19
-4
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+7
-0
No files found.
app/assets/javascripts/issues-bulk-assignment.js.coffee
View file @
618cf373
...
...
@@ -7,11 +7,25 @@ class @IssuableBulkActions
@
issues
=
@
getElement
(
'.issues-list .issue'
)
}
=
opts
# Save instance
@
form
.
data
'bulkActions'
,
@
@
disableWillUpdate
()
@
bindEvents
()
# Fixes bulk-assign not working when navigating through pages
Issuable
.
initChecks
();
enableWillUpdate
:
->
@
toggleWillUpdate
(
true
)
disableWillUpdate
:
->
@
toggleWillUpdate
(
false
)
toggleWillUpdate
:
(
enable
)
->
@
willUpdateLabels
=
if
enable
?
then
enable
else
not
@
willUpdateLabels
getElement
:
(
selector
)
->
@
container
.
find
selector
...
...
@@ -87,6 +101,7 @@ class @IssuableBulkActions
add_label_ids
:
[]
remove_label_ids
:
[]
if
@
willUpdateLabels
@
getLabelsToApply
().
map
(
id
)
->
formData
.
update
.
add_label_ids
.
push
id
...
...
app/assets/javascripts/labels_select.js.coffee
View file @
618cf373
...
...
@@ -319,6 +319,8 @@ class @LabelsSelect
multiSelect
:
$dropdown
.
hasClass
'js-multiselect'
clicked
:
(
label
)
->
_this
.
enableBulkLabelDropdown
()
if
$dropdown
.
hasClass
(
'js-filter-bulk-update'
)
return
...
...
@@ -377,3 +379,8 @@ class @LabelsSelect
label_ids
.
push
$
(
"#issue_
#{
issue_id
}
"
).
data
(
'labels'
)
_
.
intersection
.
apply
_
,
label_ids
enableBulkLabelDropdown
:
->
if
$
(
'.selected_issue:checked'
).
length
issuableBulkActions
=
$
(
'.bulk-update'
).
data
(
'bulkActions'
)
issuableBulkActions
.
enableWillUpdate
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment