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
e1d86ec9
Commit
e1d86ec9
authored
Aug 03, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Select first value by default
parent
3b228db1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
app/assets/javascripts/protected_branch_create.js.es6
app/assets/javascripts/protected_branch_create.js.es6
+11
-2
No files found.
app/assets/javascripts/protected_branch_create.js.es6
View file @
e1d86ec9
...
@@ -6,19 +6,28 @@ class ProtectedBranchCreate {
...
@@ -6,19 +6,28 @@ class ProtectedBranchCreate {
buildDropdowns() {
buildDropdowns() {
// Allowed to Merge dropdowns
// Allowed to Merge dropdowns
const $allowedToMergeDropdown = this.$wrap.find('.js-allowed-to-merge');
const $allowedToPushDropdown = this.$wrap.find('.js-allowed-to-push');
new ProtectedBranchAccessDropdown({
new ProtectedBranchAccessDropdown({
$dropdown:
this.$wrap.find('.js-allowed-to-merge')
,
$dropdown:
$allowedToMergeDropdown
,
data: gon.merge_access_levels,
data: gon.merge_access_levels,
onSelect: this.onSelect.bind(this)
onSelect: this.onSelect.bind(this)
});
});
// Select default
$allowedToMergeDropdown.data('glDropdown').selectRowAtIndex(document.createEvent('Event'), 0);
// Allowed to Push dropdowns
// Allowed to Push dropdowns
new ProtectedBranchAccessDropdown({
new ProtectedBranchAccessDropdown({
$dropdown:
this.$wrap.find('.js-allowed-to-push')
,
$dropdown:
$allowedToPushDropdown
,
data: gon.push_access_levels,
data: gon.push_access_levels,
onSelect: this.onSelect.bind(this)
onSelect: this.onSelect.bind(this)
});
});
// Select default
$allowedToPushDropdown.data('glDropdown').selectRowAtIndex(document.createEvent('Event'), 0);
new ProtectedBranchDropdowns({
new ProtectedBranchDropdowns({
$dropdowns: this.$wrap.find('.js-protected-branch-select'),
$dropdowns: this.$wrap.find('.js-protected-branch-select'),
onSelect: this.onSelect.bind(this)
onSelect: this.onSelect.bind(this)
...
...
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