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 ...@@ -91,6 +91,6 @@ issuable_created = false
$('#update_issues_ids').val [] $('#update_issues_ids').val []
$('.issues_bulk_update').hide() $('.issues_bulk_update').hide()
$('.issues-other-filters').show() $('.issues-other-filters').show()
@issuableBulkActions.disableWillUpdate() @issuableBulkActions.willUpdateLabels = false
return true return true
...@@ -10,22 +10,13 @@ class @IssuableBulkActions ...@@ -10,22 +10,13 @@ class @IssuableBulkActions
# Save instance # Save instance
@form.data 'bulkActions', @ @form.data 'bulkActions', @
@disableWillUpdate() @willUpdateLabels = false
@bindEvents() @bindEvents()
# Fixes bulk-assign not working when navigating through pages # Fixes bulk-assign not working when navigating through pages
Issuable.initChecks(); Issuable.initChecks();
enableWillUpdate: ->
@toggleWillUpdate(true)
disableWillUpdate: ->
@toggleWillUpdate(false)
toggleWillUpdate: (enable)->
@willUpdateLabels = if enable? then enable else not @willUpdateLabels
getElement: (selector) -> getElement: (selector) ->
@container.find selector @container.find selector
......
...@@ -383,4 +383,4 @@ class @LabelsSelect ...@@ -383,4 +383,4 @@ class @LabelsSelect
enableBulkLabelDropdown: -> enableBulkLabelDropdown: ->
if $('.selected_issue:checked').length if $('.selected_issue:checked').length
issuableBulkActions = $('.bulk-update').data('bulkActions') 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