debian-mirror-gitlab/app/assets/javascripts/issue_status_select.js.coffee

19 lines
524 B
CoffeeScript
Raw Normal View History

2016-06-02 11:05:42 +05:30
class @IssueStatusSelect
constructor: ->
$('.js-issue-status').each (i, el) ->
fieldName = $(el).data("field-name")
$(el).glDropdown(
selectable: true
fieldName: fieldName
2016-08-24 12:49:21 +05:30
toggleLabel: (selected, el, instance) =>
label = 'Author'
$item = instance.dropdown.find('.is-active')
label = $item.text() if $item.length
label
clicked: (item, $el, e)->
e.preventDefault()
2016-06-02 11:05:42 +05:30
id: (obj, el) ->
$(el).data("id")
)