Commit a92540aa authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'weigh_select' into 'master'

Remove var from weight_select.js

Closes #36263

See merge request gitlab-org/gitlab!20102
parents 561159e3 2b236613
/* eslint-disable one-var, no-var, no-shadow, no-else-return */
/* eslint-disable no-shadow, no-else-return */
import $ from 'jquery';
import '~/gl_dropdown';
......@@ -7,11 +7,10 @@ function WeightSelect(els, options = {}) {
const $els = $(els || '.js-weight-select');
$els.each((i, dropdown) => {
var $block, $dropdown, $selectbox, $value;
$dropdown = $(dropdown);
$selectbox = $dropdown.closest('.selectbox');
$block = $selectbox.closest('.block');
$value = $block.find('.value');
const $dropdown = $(dropdown);
const $selectbox = $dropdown.closest('.selectbox');
const $block = $selectbox.closest('.block');
const $value = $block.find('.value');
$block.find('.block-loading').fadeOut();
const fieldName = options.fieldName || $dropdown.data('fieldName');
const inputField = $dropdown.closest('.selectbox').find(`input[name='${fieldName}']`);
......
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