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
083219a9
Commit
083219a9
authored
Oct 09, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cache selector
parent
9ddb0780
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
app/assets/javascripts/weight_select.js
app/assets/javascripts/weight_select.js
+4
-3
No files found.
app/assets/javascripts/weight_select.js
View file @
083219a9
...
@@ -16,9 +16,10 @@
...
@@ -16,9 +16,10 @@
abilityName
=
$dropdown
.
data
(
'
ability-name
'
);
abilityName
=
$dropdown
.
data
(
'
ability-name
'
);
$loading
=
$block
.
find
(
'
.block-loading
'
).
fadeOut
();
$loading
=
$block
.
find
(
'
.block-loading
'
).
fadeOut
();
const
fieldName
=
options
.
fieldName
||
$dropdown
.
data
(
"
field-name
"
);
const
fieldName
=
options
.
fieldName
||
$dropdown
.
data
(
"
field-name
"
);
const
inputField
=
$dropdown
.
closest
(
'
.selectbox
'
).
find
(
`input[name='
${
fieldName
}
']`
);
if
(
Object
.
keys
(
options
).
includes
(
'
selected
'
))
{
if
(
Object
.
keys
(
options
).
includes
(
'
selected
'
))
{
$dropdown
.
closest
(
'
.selectbox
'
).
find
(
`input[name='
${
fieldName
}
']`
)
.
val
(
options
.
selected
);
inputField
.
val
(
options
.
selected
);
}
}
updateWeight
=
function
(
selected
)
{
updateWeight
=
function
(
selected
)
{
...
@@ -68,14 +69,14 @@
...
@@ -68,14 +69,14 @@
if
(
options
.
handleClick
)
{
if
(
options
.
handleClick
)
{
e
.
preventDefault
();
e
.
preventDefault
();
selected
=
$dropdown
.
closest
(
'
.selectbox
'
).
find
(
`input[name='
${
fieldName
}
']`
)
.
val
();
selected
=
inputField
.
val
();
options
.
handleClick
(
selected
);
options
.
handleClick
(
selected
);
}
else
if
(
$
(
dropdown
).
is
(
"
.js-filter-submit
"
))
{
}
else
if
(
$
(
dropdown
).
is
(
"
.js-filter-submit
"
))
{
return
$
(
dropdown
).
parents
(
'
form
'
).
submit
();
return
$
(
dropdown
).
parents
(
'
form
'
).
submit
();
}
else
if
(
$dropdown
.
is
(
'
.js-issuable-form-weight
'
))
{
}
else
if
(
$dropdown
.
is
(
'
.js-issuable-form-weight
'
))
{
e
.
preventDefault
();
e
.
preventDefault
();
}
else
{
}
else
{
selected
=
$dropdown
.
closest
(
'
.selectbox
'
).
find
(
`input[name='
${
fieldName
}
']`
)
.
val
();
selected
=
inputField
.
val
();
return
updateWeight
(
selected
);
return
updateWeight
(
selected
);
}
}
}
}
...
...
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