diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-16 15:06:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-16 15:06:26 +0300 |
commit | d2798d607e11e0ebae83ae909404834388733428 (patch) | |
tree | 096b7f4d4bdb315d28cdcd4d6db4e80911112e9c /app/assets/javascripts/labels_select.js | |
parent | d8211a0ed119eada7d292e974a8fc7b0cd982d3c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/labels_select.js')
-rw-r--r-- | app/assets/javascripts/labels_select.js | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js index 177aa02b8e0..8cc3bc8373f 100644 --- a/app/assets/javascripts/labels_select.js +++ b/app/assets/javascripts/labels_select.js @@ -1,4 +1,4 @@ -/* eslint-disable no-useless-return, func-names, no-var, no-underscore-dangle, prefer-arrow-callback, one-var, no-unused-vars, prefer-template, no-new, consistent-return, object-shorthand, no-shadow, no-param-reassign, vars-on-top, no-lonely-if, no-else-return, dot-notation, no-empty */ +/* eslint-disable no-useless-return, func-names, no-var, no-underscore-dangle, prefer-arrow-callback, one-var, prefer-template, no-new, consistent-return, object-shorthand, no-shadow, no-param-reassign, vars-on-top, no-lonely-if, no-else-return, dot-notation, no-empty */ /* global Issuable */ /* global ListLabel */ @@ -26,7 +26,6 @@ export default class LabelsSelect { $els.each(function(i, dropdown) { var $block, - $colorPreview, $dropdown, $form, $loading, @@ -35,8 +34,6 @@ export default class LabelsSelect { $value, abilityName, defaultLabel, - enableLabelCreateButton, - issueURLSplit, issueUpdateURL, labelUrl, namespacePath, @@ -47,16 +44,11 @@ export default class LabelsSelect { showNo, $sidebarLabelTooltip, initialSelected, - $toggleText, fieldName, - useId, - propertyName, showMenuAbove, - $container, $dropdownContainer; $dropdown = $(dropdown); $dropdownContainer = $dropdown.closest('.labels-filter'); - $toggleText = $dropdown.find('.dropdown-toggle-text'); namespacePath = $dropdown.data('namespacePath'); projectPath = $dropdown.data('projectPath'); issueUpdateURL = $dropdown.data('issueUpdate'); @@ -77,10 +69,6 @@ export default class LabelsSelect { $value = $block.find('.value'); $loading = $block.find('.block-loading').fadeOut(); fieldName = $dropdown.data('fieldName'); - useId = $dropdown.is( - '.js-issuable-form-dropdown, .js-filter-bulk-update, .js-label-sidebar-dropdown', - ); - propertyName = useId ? 'id' : 'title'; initialSelected = $selectbox .find('input[name="' + $dropdown.data('fieldName') + '"]') .map(function() { @@ -124,7 +112,7 @@ export default class LabelsSelect { axios .put(issueUpdateURL, data) .then(({ data }) => { - var labelCount, template, labelTooltipTitle, labelTitles, formattedLabels; + var labelCount, template, labelTooltipTitle, labelTitles; $loading.fadeOut(); $dropdown.trigger('loaded.gl.dropdown'); $selectbox.hide(); @@ -246,12 +234,10 @@ export default class LabelsSelect { renderRow: function(label) { var linkEl, listItemEl, - color, colorEl, indeterminate, removesAll, selectedClass, - spacing, i, marked, dropdownValue; @@ -378,7 +364,7 @@ export default class LabelsSelect { } }, hidden: function() { - var isIssueIndex, isMRIndex, page, selectedLabels; + var isIssueIndex, isMRIndex, page; page = $('body').attr('data-page'); isIssueIndex = page === 'projects:issues:index'; isMRIndex = page === 'projects:merge_requests:index'; @@ -395,9 +381,6 @@ export default class LabelsSelect { } if ($dropdown.hasClass('js-multiselect')) { if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) { - selectedLabels = $dropdown - .closest('form') - .find("input:hidden[name='" + $dropdown.data('fieldName') + "']"); Issuable.filterResults($dropdown.closest('form')); } else if ($dropdown.hasClass('js-filter-submit')) { $dropdown.closest('form').submit(); @@ -495,7 +478,7 @@ export default class LabelsSelect { } } }, - opened: function(e) { + opened: function() { if ($dropdown.hasClass('js-issue-board-sidebar')) { const previousSelection = $dropdown.attr('data-selected'); this.selected = previousSelection ? previousSelection.split(',') : []; |