diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-18 20:49:23 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-18 20:49:23 +0300 |
commit | 9a99fccb9717d4f1b0221de84094bb8db4ed280f (patch) | |
tree | 695b8962ef19e600054a58b59e506e10deeac456 /app/assets/javascripts/labels_select.js.coffee | |
parent | 6c29e1ef69d4ee7e656d0b3b203cf43ff68c637b (diff) |
Remove $parent
Diffstat (limited to 'app/assets/javascripts/labels_select.js.coffee')
-rw-r--r-- | app/assets/javascripts/labels_select.js.coffee | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/assets/javascripts/labels_select.js.coffee b/app/assets/javascripts/labels_select.js.coffee index ddf7d84a388..602fc4be07e 100644 --- a/app/assets/javascripts/labels_select.js.coffee +++ b/app/assets/javascripts/labels_select.js.coffee @@ -2,15 +2,14 @@ class @LabelsSelect constructor: -> $('.js-label-select').each (i, dropdown) -> $dropdown = $(dropdown) - $parent = $dropdown.parent() projectId = $dropdown.data('project-id') labelUrl = $dropdown.data('labels') issueUpdateURL = $dropdown.data('issueUpdate') selectedLabel = $dropdown.data('selected') if selectedLabel? selectedLabel = selectedLabel.split(',') - newLabelField = $('#new_label_name', $parent) - newColorField = $('#new_label_color', $parent) + newLabelField = $('#new_label_name') + newColorField = $('#new_label_color') showNo = $dropdown.data('show-no') showAny = $dropdown.data('show-any') defaultLabel = $dropdown.data('default-label') @@ -19,9 +18,9 @@ class @LabelsSelect $block = $selectbox.closest('.block') $sidebarCollapsedValue = $block.find('.sidebar-collapsed-icon span') $value = $block.find('.value') - $newLabelError = $('.js-label-error', $parent) - $colorPreview = $('.js-dropdown-label-color-preview', $parent) - $newLabelCreateButton = $('.js-new-label-btn', $parent) + $newLabelError = $('.js-label-error') + $colorPreview = $('.js-dropdown-label-color-preview') + $newLabelCreateButton = $('.js-new-label-btn') $newLabelError.hide() $loading = $block.find('.block-loading').fadeOut() |