summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-06-23 07:16:45 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-06-23 07:16:45 -0500
commitd002ef85d2c03e80edaca7412fe0b32e8b909e24 (patch)
treedbf4c67131c45d4ded38ad7bb83adefa8334f3aa
parenta6f082d5bda5e8efe3d194d524beea0a90ad7def (diff)
downloadgitlab-ce-d002ef85d2c03e80edaca7412fe0b32e8b909e24.tar.gz
Use instance property to enable/disable label assignmentfix-bulk-assign
-rw-r--r--app/assets/javascripts/issuable.js.coffee2
-rw-r--r--app/assets/javascripts/issues-bulk-assignment.js.coffee11
-rw-r--r--app/assets/javascripts/labels_select.js.coffee2
3 files changed, 3 insertions, 12 deletions
diff --git a/app/assets/javascripts/issuable.js.coffee b/app/assets/javascripts/issuable.js.coffee
index 23c823942c7..6a108c033ea 100644
--- a/app/assets/javascripts/issuable.js.coffee
+++ b/app/assets/javascripts/issuable.js.coffee
@@ -91,6 +91,6 @@ issuable_created = false
$('#update_issues_ids').val []
$('.issues_bulk_update').hide()
$('.issues-other-filters').show()
- @issuableBulkActions.disableWillUpdate()
+ @issuableBulkActions.willUpdateLabels = false
return true
diff --git a/app/assets/javascripts/issues-bulk-assignment.js.coffee b/app/assets/javascripts/issues-bulk-assignment.js.coffee
index 8ca7409f5b4..6b0e69dbae7 100644
--- a/app/assets/javascripts/issues-bulk-assignment.js.coffee
+++ b/app/assets/javascripts/issues-bulk-assignment.js.coffee
@@ -10,22 +10,13 @@ class @IssuableBulkActions
# Save instance
@form.data 'bulkActions', @
- @disableWillUpdate()
+ @willUpdateLabels = false
@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
diff --git a/app/assets/javascripts/labels_select.js.coffee b/app/assets/javascripts/labels_select.js.coffee
index 0729d5d91ce..e95fd96a83f 100644
--- a/app/assets/javascripts/labels_select.js.coffee
+++ b/app/assets/javascripts/labels_select.js.coffee
@@ -383,4 +383,4 @@ class @LabelsSelect
enableBulkLabelDropdown: ->
if $('.selected_issue:checked').length
issuableBulkActions = $('.bulk-update').data('bulkActions')
- issuableBulkActions.enableWillUpdate()
+ issuableBulkActions.willUpdateLabels = true