Welcome to mirror list, hosted at ThFree Co, Russian Federation.

subscription_select.js.coffee « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e5eb7a50d803351557579aade6834be2badde712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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")
      )