mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 13:46:11 +10:00
Set button label when picking an option from status dropdown ## What does this MR do? Fixes an issue with the status dropdown. It was not setting up the correct label after picking an option ## What are the relevant issue numbers? Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/18536 ## Screenshots (if relevant) **Previous**  **After**  ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - [ ] Tests - [ ] Added for this feature/bug - [x] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4771
19 lines
524 B
CoffeeScript
19 lines
524 B
CoffeeScript
class @IssueStatusSelect
|
|
constructor: ->
|
|
$('.js-issue-status').each (i, el) ->
|
|
fieldName = $(el).data("field-name")
|
|
|
|
$(el).glDropdown(
|
|
selectable: true
|
|
fieldName: fieldName
|
|
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()
|
|
id: (obj, el) ->
|
|
$(el).data("id")
|
|
)
|