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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
1bc53bc8
Commit
1bc53bc8
authored
Aug 24, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure we update the label after input is added
parent
6fb46b60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+7
-9
No files found.
app/assets/javascripts/gl_dropdown.js
View file @
1bc53bc8
...
...
@@ -565,10 +565,6 @@
}
else
{
field
.
remove
();
}
if
(
this
.
options
.
toggleLabel
)
{
this
.
updateLabel
(
selectedObject
,
el
,
this
);
}
return
selectedObject
;
}
else
if
(
el
.
hasClass
(
INDETERMINATE_CLASS
))
{
el
.
addClass
(
ACTIVE_CLASS
);
el
.
removeClass
(
INDETERMINATE_CLASS
);
...
...
@@ -578,7 +574,6 @@
if
(
!
field
.
length
&&
fieldName
)
{
this
.
addInput
(
fieldName
,
value
,
selectedObject
);
}
return
selectedObject
;
}
else
{
if
(
!
this
.
options
.
multiSelect
||
el
.
hasClass
(
'
dropdown-clear-active
'
))
{
this
.
dropdown
.
find
(
"
.
"
+
ACTIVE_CLASS
).
removeClass
(
ACTIVE_CLASS
);
...
...
@@ -590,9 +585,6 @@
field
.
remove
();
}
el
.
addClass
(
ACTIVE_CLASS
);
if
(
this
.
options
.
toggleLabel
)
{
this
.
updateLabel
(
selectedObject
,
el
,
this
);
}
if
(
value
!=
null
)
{
if
(
!
field
.
length
&&
fieldName
)
{
this
.
addInput
(
fieldName
,
value
,
selectedObject
);
...
...
@@ -600,8 +592,14 @@
field
.
val
(
value
).
trigger
(
'
change
'
);
}
}
return
selectedObject
;
}
// Update label right after input has been added
if
(
this
.
options
.
toggleLabel
)
{
this
.
updateLabel
(
selectedObject
,
el
,
this
);
}
return
selectedObject
;
};
GitLabDropdown
.
prototype
.
addInput
=
function
(
fieldName
,
value
,
selectedObject
)
{
...
...
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