Commit 0e3208c4 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Use instance property to enable/disable label assignment

parent 7c9909eb
......@@ -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
......@@ -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
......
......@@ -383,4 +383,4 @@ class @LabelsSelect
enableBulkLabelDropdown: ->
if $('.selected_issue:checked').length
issuableBulkActions = $('.bulk-update').data('bulkActions')
issuableBulkActions.enableWillUpdate()
issuableBulkActions.willUpdateLabels = true
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment