Commit f02ee986 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Tweaks for bulk assignment

parent 151158f1
...@@ -237,13 +237,23 @@ class @LabelsSelect ...@@ -237,13 +237,23 @@ class @LabelsSelect
else else
colorEl = '' colorEl = ''
# We need to identify which items are actually labels
labelIdHtml = labelClass = ''
if label.id
# Add label id only for labels
labelIdHtml = "data-label-id='#{label.id}'"
# Add class only for labels
labelClass = 'label-item'
"<li> "<li>
<a href='#' class='#{selectedClass.join(' ')}'> <a href='#' #{labelIdHtml} class='#{labelClass} #{selectedClass.join(' ')}'>
#{colorEl} #{colorEl}
#{_.escape(label.title)} #{_.escape(label.title)}
</a> </a>
</li>" </li>"
filterable: true persistWhenHide: $dropdown.data('persistWhenHide')
search: search:
fields: ['title'] fields: ['title']
selectable: true selectable: true
...@@ -291,7 +301,9 @@ class @LabelsSelect ...@@ -291,7 +301,9 @@ class @LabelsSelect
saveLabelData() saveLabelData()
if $dropdown.hasClass('js-filter-bulk-update') if $dropdown.hasClass('js-filter-bulk-update')
$dropdown.parent().find('.is-active, .is-indeterminate').removeClass() # If we are persisting state we need the classes
if not @options.persistWhenHide
$dropdown.parent().find('.is-active, .is-indeterminate').removeClass()
multiSelect: $dropdown.hasClass 'js-multiselect' multiSelect: $dropdown.hasClass 'js-multiselect'
clicked: (label) -> clicked: (label) ->
......
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