Commit 2b236613 authored by Utkarsh Gupta's avatar Utkarsh Gupta

Remote var from weight_select.js

parent 5aace8a5
/* 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