Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2b236613
Commit
2b236613
authored
Nov 14, 2019
by
Utkarsh Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remote var from weight_select.js
parent
5aace8a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
ee/app/assets/javascripts/weight_select.js
ee/app/assets/javascripts/weight_select.js
+5
-6
No files found.
ee/app/assets/javascripts/weight_select.js
View file @
2b236613
/* eslint-disable
one-var, no-var,
no-shadow, no-else-return */
/* eslint-disable no-shadow, no-else-return */
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
'
~/gl_dropdown
'
;
import
'
~/gl_dropdown
'
;
...
@@ -7,11 +7,10 @@ function WeightSelect(els, options = {}) {
...
@@ -7,11 +7,10 @@ function WeightSelect(els, options = {}) {
const
$els
=
$
(
els
||
'
.js-weight-select
'
);
const
$els
=
$
(
els
||
'
.js-weight-select
'
);
$els
.
each
((
i
,
dropdown
)
=>
{
$els
.
each
((
i
,
dropdown
)
=>
{
var
$block
,
$dropdown
,
$selectbox
,
$value
;
const
$dropdown
=
$
(
dropdown
);
$dropdown
=
$
(
dropdown
);
const
$selectbox
=
$dropdown
.
closest
(
'
.selectbox
'
);
$selectbox
=
$dropdown
.
closest
(
'
.selectbox
'
);
const
$block
=
$selectbox
.
closest
(
'
.block
'
);
$block
=
$selectbox
.
closest
(
'
.block
'
);
const
$value
=
$block
.
find
(
'
.value
'
);
$value
=
$block
.
find
(
'
.value
'
);
$block
.
find
(
'
.block-loading
'
).
fadeOut
();
$block
.
find
(
'
.block-loading
'
).
fadeOut
();
const
fieldName
=
options
.
fieldName
||
$dropdown
.
data
(
'
fieldName
'
);
const
fieldName
=
options
.
fieldName
||
$dropdown
.
data
(
'
fieldName
'
);
const
inputField
=
$dropdown
.
closest
(
'
.selectbox
'
).
find
(
`input[name='
${
fieldName
}
']`
);
const
inputField
=
$dropdown
.
closest
(
'
.selectbox
'
).
find
(
`input[name='
${
fieldName
}
']`
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment