36dc4a5ce7
fixies #19747
18 lines
537 B
CoffeeScript
18 lines
537 B
CoffeeScript
class @SubscriptionSelect
|
|
constructor: ->
|
|
$('.js-subscription-event').each (i, el) ->
|
|
fieldName = $(el).data("field-name")
|
|
|
|
$(el).glDropdown(
|
|
selectable: true
|
|
fieldName: fieldName
|
|
toggleLabel: (selected, el, instance) =>
|
|
label = 'Subscription'
|
|
$item = instance.dropdown.find('.is-active')
|
|
label = $item.text() if $item.length
|
|
label
|
|
clicked: (item, $el, e)->
|
|
e.preventDefault()
|
|
id: (obj, el) ->
|
|
$(el).data("id")
|
|
)
|