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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
e3a98305
Commit
e3a98305
authored
Mar 31, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip default behaviour if we are clicking a result for the same location
parent
ccc929d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
app/assets/javascripts/gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+1
-1
app/assets/javascripts/search_autocomplete.js.coffee
app/assets/javascripts/search_autocomplete.js.coffee
+8
-0
No files found.
app/assets/javascripts/gl_dropdown.js.coffee
View file @
e3a98305
...
@@ -174,7 +174,7 @@ class GitLabDropdown
...
@@ -174,7 +174,7 @@ class GitLabDropdown
selected
=
self
.
rowClicked
$
(
@
)
selected
=
self
.
rowClicked
$
(
@
)
if
self
.
options
.
clicked
if
self
.
options
.
clicked
self
.
options
.
clicked
(
selected
)
self
.
options
.
clicked
(
selected
,
e
)
# Finds an element inside wrapper element
# Finds an element inside wrapper element
getElement
:
(
selector
)
->
getElement
:
(
selector
)
->
...
...
app/assets/javascripts/search_autocomplete.js.coffee
View file @
e3a98305
...
@@ -62,6 +62,8 @@ class @SearchAutocomplete
...
@@ -62,6 +62,8 @@ class @SearchAutocomplete
search
:
search
:
fields
:
[
'text'
]
fields
:
[
'text'
]
data
:
@
getData
.
bind
(
@
)
data
:
@
getData
.
bind
(
@
)
selectable
:
true
clicked
:
@
onClick
.
bind
(
@
)
getData
:
(
term
,
callback
)
->
getData
:
(
term
,
callback
)
->
_this
=
@
_this
=
@
...
@@ -268,3 +270,9 @@ class @SearchAutocomplete
...
@@ -268,3 +270,9 @@ class @SearchAutocomplete
<li><a class='dropdown-menu-empty-link is-focused'>Loading...</a></li>
<li><a class='dropdown-menu-empty-link is-focused'>Loading...</a></li>
</ul>"
</ul>"
@
dropdownContent
.
html
(
html
)
@
dropdownContent
.
html
(
html
)
onClick
:
(
item
,
e
)
->
if
location
.
pathname
.
indexOf
(
item
.
url
)
isnt
-
1
e
.
preventDefault
()
@
disableAutocomplete
()
@
searchInput
.
val
(
''
)
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