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
3a8c4ebb
Commit
3a8c4ebb
authored
Mar 21, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loop through form inputs
parent
f7a97291
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
app/assets/javascripts/search_autocomplete.js.coffee
app/assets/javascripts/search_autocomplete.js.coffee
+8
-11
No files found.
app/assets/javascripts/search_autocomplete.js.coffee
View file @
3a8c4ebb
...
...
@@ -28,7 +28,6 @@ class @SearchAutocomplete
@
groupInputEl
=
@
getElement
(
'#group_id'
)
@
searchCodeInputEl
=
@
getElement
(
'#search_code'
)
@
repositoryInputEl
=
@
getElement
(
'#repository_ref'
)
@
scopeInputEl
=
@
getElement
(
'#scope'
)
@
saveOriginalState
()
...
...
@@ -51,6 +50,7 @@ class @SearchAutocomplete
group_id
:
@
groupInputEl
.
val
()
search_code
:
@
searchCodeInputEl
.
val
()
repository_ref
:
@
repositoryInputEl
.
val
()
scope
:
@
scopeInputEl
.
val
()
# Location badge
_location
:
$
.
trim
(
@
locationText
.
text
())
...
...
@@ -191,20 +191,17 @@ class @SearchAutocomplete
@
locationBadgeEl
.
children
().
length
resetSearchState
:
->
# Remove scope
@
scopeInputEl
.
val
(
''
)
inputs
=
Object
.
keys
@
originalState
# Remove group
@
groupInputEl
.
val
(
''
)
for
input
in
inputs
# Remove project id
@
projectInputEl
.
val
(
''
)
# _location isnt a input
break
if
input
is
'_location'
# Remove code search
@
searchCodeInputEl
.
val
(
''
)
# renamed to avoid tests to fail
if
input
is
'project_id'
then
input
=
'search_project_id'
# Remove repository ref
@
repositoryInputEl
.
val
(
''
)
@
getElement
(
"#
#{
input
}
"
).
val
(
''
)
removeLocationBadge
:
->
@
locationBadgeEl
.
empty
()
...
...
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