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
Léo-Paul Géneau
gitlab-ce
Commits
7a0a9c23
Commit
7a0a9c23
authored
Aug 30, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the correct scope to avoid triggering all dropdowns
parent
0232cabc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
app/assets/javascripts/project_select_combo_button.js
app/assets/javascripts/project_select_combo_button.js
+6
-6
No files found.
app/assets/javascripts/project_select_combo_button.js
View file @
7a0a9c23
...
...
@@ -13,14 +13,13 @@ export default class ProjectSelectComboButton {
}
bindEvents
()
{
const
dropdownButton
=
this
.
projectSelectInput
.
siblings
(
'
.new-project-item-select-button
'
);
dropdownButton
.
on
(
'
click
'
,
this
.
openDropdown
);
this
.
projectSelectInput
.
siblings
(
'
.new-project-item-select-button
'
)
.
on
(
'
click
'
,
e
=>
this
.
openDropdown
(
e
));
this
.
newItemBtn
.
on
(
'
click
'
,
(
e
)
=>
{
if
(
!
this
.
getProjectFromLocalStorage
())
{
e
.
preventDefault
();
dropdownButton
.
trigger
(
'
click
'
);
this
.
openDropdown
(
e
);
}
});
...
...
@@ -36,8 +35,9 @@ export default class ProjectSelectComboButton {
}
}
openDropdown
()
{
$
(
this
).
siblings
(
'
.project-item-select
'
).
select2
(
'
open
'
);
// eslint-disable-next-line class-methods-use-this
openDropdown
(
event
)
{
$
(
event
.
currentTarget
).
siblings
(
'
.project-item-select
'
).
select2
(
'
open
'
);
}
selectProject
()
{
...
...
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