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
Boxiang Sun
gitlab-ce
Commits
a7d7e9a5
Commit
a7d7e9a5
authored
8 years ago
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set default label if user unselects the option from dropdown
parent
4a4d8608
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
app/assets/javascripts/protected_branch_access_dropdown.js.es6
...ssets/javascripts/protected_branch_access_dropdown.js.es6
+6
-2
No files found.
app/assets/javascripts/protected_branch_access_dropdown.js.es6
View file @
a7d7e9a5
...
@@ -10,8 +10,12 @@
...
@@ -10,8 +10,12 @@
selectable: true,
selectable: true,
inputId: $dropdown.data('input-id'),
inputId: $dropdown.data('input-id'),
fieldName: $dropdown.data('field-name'),
fieldName: $dropdown.data('field-name'),
toggleLabel(item) {
toggleLabel(item, el) {
return item.text;
if (el.is('.is-active')) {
return item.text;
} else {
return 'Select';
}
},
},
clicked(item, $el, e) {
clicked(item, $el, e) {
e.preventDefault();
e.preventDefault();
...
...
This diff is collapsed.
Click to expand it.
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