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
0dc64a8c
Commit
0dc64a8c
authored
Feb 05, 2016
by
Josh Frye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JS Fixes
parent
dd1a683c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+1
-1
app/assets/javascripts/projects_list.js.coffee
app/assets/javascripts/projects_list.js.coffee
+14
-13
No files found.
app/assets/javascripts/dashboard.js.coffee
View file @
0dc64a8c
@
Dashboard
=
@
Dashboard
=
init
:
->
init
:
->
$
(
"#project-filter-form-field"
).
unbind
(
)
$
(
"#project-filter-form-field"
).
off
(
'keyup'
)
this
.
initSearch
()
this
.
initSearch
()
initSearch
:
->
initSearch
:
->
...
...
app/assets/javascripts/projects_list.js.coffee
View file @
0dc64a8c
class
@
ProjectsList
class
@
ProjectsList
constructor
:
->
constructor
:
->
$
(
"#project-filter-form-field"
).
unbind
(
)
$
(
"#project-filter-form-field"
).
off
(
'keyup'
)
$
(
".projects-list .js-expand"
).
on
'click'
,
(
e
)
->
$
(
".projects-list .js-expand"
).
on
'click'
,
(
e
)
->
e
.
preventDefault
()
e
.
preventDefault
()
list
=
$
(
this
).
closest
(
'.projects-list'
)
list
=
$
(
this
).
closest
(
'.projects-list'
)
$
(
"#filter_projects"
).
keyup
->
$
(
"#filter_projects"
).
on
'keyup'
,
->
ProjectsList
.
filter_results
(
"#filter_projects"
)
ProjectsList
.
filter_results
(
$
(
"#filter_projects"
)
)
$
(
"#project-filter-form-field"
).
keyup
->
$
(
"#project-filter-form-field"
).
on
'keyup'
,
->
ProjectsList
.
filter_results
(
"#project-filter-form-field"
)
ProjectsList
.
filter_results
(
$
(
"#project-filter-form-field"
)
)
@
filter_results
:
(
element
)
->
@
filter_results
:
(
$
element
)
->
terms
=
$
(
element
).
val
()
terms
=
$
(
$
element
).
val
()
filterSelector
=
$
(
element
).
data
(
'filter-selector'
)
||
'span.filter-title'
filterSelector
=
$
(
$
element
).
data
(
'filter-selector'
)
||
'span.filter-title'
if
terms
==
""
||
terms
==
undefined
if
not
terms
$
(
"ul.projects-list li"
).
show
()
$
(
"ul.projects-list li"
).
show
()
$
(
'.gl-pagination'
).
show
()
$
(
'.gl-pagination'
).
show
()
else
else
$
(
"ul.projects-list li"
).
each
(
index
)
->
$
(
"ul.projects-list li"
).
each
(
index
)
->
name
=
$
(
this
).
find
(
filterSelector
).
text
()
$this
=
$
(
this
)
name
=
$this
.
find
(
filterSelector
).
text
()
if
name
.
toLowerCase
().
search
(
terms
.
toLowerCase
())
==
-
1
if
name
.
toLowerCase
().
indexOf
(
terms
.
toLowerCase
())
==
-
1
$
(
this
)
.
hide
()
$
this
.
hide
()
else
else
$
(
this
)
.
show
()
$
this
.
show
()
$
(
'.gl-pagination'
).
hide
()
$
(
'.gl-pagination'
).
hide
()
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