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
Jérome Perrin
gitlab-ce
Commits
dd1a683c
Commit
dd1a683c
authored
Feb 05, 2016
by
Josh Frye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix explore filter. Fixes #13182
parent
706b101f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
24 deletions
+21
-24
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+1
-0
app/assets/javascripts/projects_list.js.coffee
app/assets/javascripts/projects_list.js.coffee
+20
-16
app/views/explore/projects/_filter.html.haml
app/views/explore/projects/_filter.html.haml
+0
-8
No files found.
app/assets/javascripts/dashboard.js.coffee
View file @
dd1a683c
@
Dashboard
=
init
:
->
$
(
"#project-filter-form-field"
).
unbind
()
this
.
initSearch
()
initSearch
:
->
...
...
app/assets/javascripts/projects_list.js.coffee
View file @
dd1a683c
class
@
ProjectsList
constructor
:
->
$
(
"#project-filter-form-field"
).
unbind
()
$
(
".projects-list .js-expand"
).
on
'click'
,
(
e
)
->
e
.
preventDefault
()
list
=
$
(
this
).
closest
(
'.projects-list'
)
list
.
find
(
"li"
).
show
()
list
.
find
(
"li.bottom"
).
hide
()
$
(
".projects-list-filter"
).
keyup
->
terms
=
$
(
this
).
val
()
uiBox
=
$
(
'div.projects-list-holder'
)
filterSelector
=
$
(
this
).
data
(
'filter-selector'
)
||
'span.filter-title'
$
(
"#filter_projects"
).
keyup
->
ProjectsList
.
filter_results
(
"#filter_projects"
)
$
(
"#project-filter-form-field"
).
keyup
->
ProjectsList
.
filter_results
(
"#project-filter-form-field"
)
@
filter_results
:
(
element
)
->
terms
=
$
(
element
).
val
()
filterSelector
=
$
(
element
).
data
(
'filter-selector'
)
||
'span.filter-title'
if
terms
==
""
||
terms
==
undefined
uiBox
.
find
(
"ul.projects-list li"
).
show
()
$
(
"ul.projects-list li"
).
show
()
$
(
'.gl-pagination'
).
show
()
else
uiBox
.
find
(
"ul.projects-list li"
).
each
(
index
)
->
$
(
"ul.projects-list li"
).
each
(
index
)
->
name
=
$
(
this
).
find
(
filterSelector
).
text
()
if
name
.
toLowerCase
().
search
(
terms
.
toLowerCase
())
==
-
1
$
(
this
).
hide
()
else
$
(
this
).
show
()
uiBox
.
find
(
"ul.projects-list li.bottom"
).
hide
()
$
(
'.gl-pagination'
).
hide
()
app/views/explore/projects/_filter.html.haml
View file @
dd1a683c
.pull-left
=
form_tag
explore_projects_filter_path
,
method: :get
,
class:
'form-inline form-tiny'
do
|
f
|
.form-group
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
"Filter by name"
,
class:
"form-control search-text-input"
,
id:
"projects_search"
,
spellcheck:
false
=
hidden_field_tag
:sort
,
@sort
.form-group
=
button_tag
'Search'
,
class:
"btn"
.pull-right.hidden-sm.hidden-xs
-
if
current_user
.dropdown.inline.append-right-10
...
...
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