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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2c871ca1
Commit
2c871ca1
authored
Feb 03, 2016
by
Josh Frye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay filter until user stops typing
parent
7522ac0b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
26 deletions
+33
-26
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+1
-1
app/assets/javascripts/issues.js.coffee
app/assets/javascripts/issues.js.coffee
+1
-1
app/assets/javascripts/projects_list.js.coffee
app/assets/javascripts/projects_list.js.coffee
+28
-21
app/assets/javascripts/user.js.coffee
app/assets/javascripts/user.js.coffee
+1
-1
app/views/dashboard/_projects_head.html.haml
app/views/dashboard/_projects_head.html.haml
+1
-1
app/views/dashboard/projects/_projects.html.haml
app/views/dashboard/projects/_projects.html.haml
+1
-1
No files found.
app/assets/javascripts/dashboard.js.coffee
View file @
2c871ca1
class
@
Dashboard
class
@
Dashboard
constructor
:
->
constructor
:
->
new
ProjectsLis
t
()
ProjectsList
.
ini
t
()
app/assets/javascripts/issues.js.coffee
View file @
2c871ca1
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
filterResults
:
=>
filterResults
:
=>
form
=
$
(
"#issue_search_form"
)
form
=
$
(
"#issue_search_form"
)
search
=
$
(
"#
issue_search
"
).
val
()
search
=
$
(
"#
projects-list-filter
"
).
val
()
$
(
'.issues-holder'
).
css
(
"opacity"
,
'0.5'
)
$
(
'.issues-holder'
).
css
(
"opacity"
,
'0.5'
)
issues_url
=
form
.
attr
(
'action'
)
+
'?'
+
form
.
serialize
()
issues_url
=
form
.
attr
(
'action'
)
+
'?'
+
form
.
serialize
()
...
...
app/assets/javascripts/projects_list.js.coffee
View file @
2c871ca1
class
@
ProjectsList
@
ProjectsList
=
constructor
:
->
init
:
->
$
(
".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'
)
list
.
find
(
"li"
).
show
()
list
.
find
(
"li"
).
show
()
list
.
find
(
"li.bottom"
).
hide
()
list
.
find
(
"li.bottom"
).
hide
()
this
.
initSearch
()
$
(
".projects-list-filter"
).
keyup
->
initSearch
:
->
terms
=
$
(
this
).
val
()
@
timer
=
null
uiBox
=
$
(
'div.projects-list-holder'
)
$
(
"#projects-list-filter"
).
keyup
->
filterSelector
=
$
(
this
).
data
(
'filter-selector'
)
||
'span.filter-title'
clearTimeout
(
@
timer
)
@
timer
=
setTimeout
(
ProjectsList
.
filterResults
,
500
)
$
(
'.projects-list-holder'
).
css
(
"opacity"
,
'0.5'
)
filterResults
:
=>
form
=
$
(
"#project-list-form"
)
form
=
$
(
"#project-list-form"
)
project_filter_url
=
form
.
attr
(
'action'
)
+
'?'
+
form
.
serialize
()
search
=
$
(
"#issue_search"
).
val
()
$
.
ajax
uiBox
=
$
(
'div.projects-list-holder'
)
type
:
"GET"
url
:
form
.
attr
(
'action'
)
$
(
'.projects-list-holder'
).
css
(
"opacity"
,
'0.5'
)
data
:
form
.
serialize
()
complete
:
->
project_filter_url
=
form
.
attr
(
'action'
)
+
'?'
+
form
.
serialize
()
$
(
'.projects-list-holder'
).
css
(
"opacity"
,
'1.0'
)
$
.
ajax
success
:
(
data
)
->
type
:
"GET"
$
(
'.projects-list-holder'
).
html
(
data
.
html
)
url
:
form
.
attr
(
'action'
)
# Change url so if user reload a page - search results are saved
data
:
form
.
serialize
()
history
.
replaceState
{
page
:
project_filter_url
},
document
.
title
,
project_filter_url
complete
:
->
dataType
:
"json"
$
(
'.projects-list-holder'
).
css
(
"opacity"
,
'1.0'
)
uiBox
.
find
(
"ul.projects-list li.bottom"
).
hide
()
success
:
(
data
)
->
$
(
'.projects-list-holder'
).
html
(
data
.
html
)
# Change url so if user reload a page - search results are saved
history
.
replaceState
{
page
:
project_filter_url
},
document
.
title
,
project_filter_url
dataType
:
"json"
uiBox
.
find
(
"ul.projects-list li.bottom"
).
hide
()
app/assets/javascripts/user.js.coffee
View file @
2c871ca1
class
@
User
class
@
User
constructor
:
->
constructor
:
->
$
(
'.profile-groups-avatars'
).
tooltip
(
"placement"
:
"top"
)
$
(
'.profile-groups-avatars'
).
tooltip
(
"placement"
:
"top"
)
new
ProjectsLis
t
()
ProjectsList
.
ini
t
()
$
(
'.hide-project-limit-message'
).
on
'click'
,
(
e
)
->
$
(
'.hide-project-limit-message'
).
on
'click'
,
(
e
)
->
path
=
'/'
path
=
'/'
...
...
app/views/dashboard/_projects_head.html.haml
View file @
2c871ca1
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
.nav-controls
.nav-controls
=
form_tag
''
,
method: :get
,
class:
'project-list-form'
,
id:
'project-list-form'
do
|
f
|
=
form_tag
''
,
method: :get
,
class:
'project-list-form'
,
id:
'project-list-form'
do
|
f
|
.append-right-10.hidden-xs.hidden-sm
.append-right-10.hidden-xs.hidden-sm
=
search_field_tag
:filter_projects
,
params
[
:filter_projects
],
placeholder:
'Filter by name...'
,
class:
'projects-list-filter form-control
issue_search
search-text-input'
,
spellcheck:
false
,
id:
'projects-list-filter'
=
search_field_tag
:filter_projects
,
params
[
:filter_projects
],
placeholder:
'Filter by name...'
,
class:
'projects-list-filter form-control search-text-input'
,
spellcheck:
false
,
id:
'projects-list-filter'
-
if
current_user
.
can_create_project?
-
if
current_user
.
can_create_project?
=
link_to
new_project_path
,
class:
'btn btn-new'
do
=
link_to
new_project_path
,
class:
'btn btn-new'
do
=
icon
(
'plus'
)
=
icon
(
'plus'
)
...
...
app/views/dashboard/projects/_projects.html.haml
View file @
2c871ca1
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
=
render
'shared/projects/list'
,
ci:
true
=
render
'shared/projects/list'
,
ci:
true
:javascript
:javascript
new
ProjectsList
();
ProjectsList
.
init
()
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