Commit 9a99fccb authored by Alfredo Sumaran's avatar Alfredo Sumaran

Remove $parent

parent 6c29e1ef
...@@ -2,15 +2,14 @@ class @LabelsSelect ...@@ -2,15 +2,14 @@ class @LabelsSelect
constructor: -> constructor: ->
$('.js-label-select').each (i, dropdown) -> $('.js-label-select').each (i, dropdown) ->
$dropdown = $(dropdown) $dropdown = $(dropdown)
$parent = $dropdown.parent()
projectId = $dropdown.data('project-id') projectId = $dropdown.data('project-id')
labelUrl = $dropdown.data('labels') labelUrl = $dropdown.data('labels')
issueUpdateURL = $dropdown.data('issueUpdate') issueUpdateURL = $dropdown.data('issueUpdate')
selectedLabel = $dropdown.data('selected') selectedLabel = $dropdown.data('selected')
if selectedLabel? if selectedLabel?
selectedLabel = selectedLabel.split(',') selectedLabel = selectedLabel.split(',')
newLabelField = $('#new_label_name', $parent) newLabelField = $('#new_label_name')
newColorField = $('#new_label_color', $parent) newColorField = $('#new_label_color')
showNo = $dropdown.data('show-no') showNo = $dropdown.data('show-no')
showAny = $dropdown.data('show-any') showAny = $dropdown.data('show-any')
defaultLabel = $dropdown.data('default-label') defaultLabel = $dropdown.data('default-label')
...@@ -19,9 +18,9 @@ class @LabelsSelect ...@@ -19,9 +18,9 @@ class @LabelsSelect
$block = $selectbox.closest('.block') $block = $selectbox.closest('.block')
$sidebarCollapsedValue = $block.find('.sidebar-collapsed-icon span') $sidebarCollapsedValue = $block.find('.sidebar-collapsed-icon span')
$value = $block.find('.value') $value = $block.find('.value')
$newLabelError = $('.js-label-error', $parent) $newLabelError = $('.js-label-error')
$colorPreview = $('.js-dropdown-label-color-preview', $parent) $colorPreview = $('.js-dropdown-label-color-preview')
$newLabelCreateButton = $('.js-new-label-btn', $parent) $newLabelCreateButton = $('.js-new-label-btn')
$newLabelError.hide() $newLabelError.hide()
$loading = $block.find('.block-loading').fadeOut() $loading = $block.find('.block-loading').fadeOut()
......
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