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
Léo-Paul Géneau
gitlab-ce
Commits
cf8a74be
Commit
cf8a74be
authored
Feb 09, 2016
by
Josh Frye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup to use one selector
parent
929b53c6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+4
-4
app/views/dashboard/_projects_head.html.haml
app/views/dashboard/_projects_head.html.haml
+1
-1
app/views/explore/projects/_projects.html.haml
app/views/explore/projects/_projects.html.haml
+1
-1
app/views/groups/_projects.html.haml
app/views/groups/_projects.html.haml
+1
-1
app/views/projects/forks/index.html.haml
app/views/projects/forks/index.html.haml
+1
-1
No files found.
app/assets/javascripts/dashboard.js.coffee
View file @
cf8a74be
@
Dashboard
=
@
Dashboard
=
init
:
->
init
:
->
$
(
"
input#project-filter-form-field,
.projects-list-filter"
).
off
(
'keyup'
)
$
(
".projects-list-filter"
).
off
(
'keyup'
)
this
.
initSearch
()
this
.
initSearch
()
initSearch
:
->
initSearch
:
->
@
timer
=
null
@
timer
=
null
$
(
"
input#project-filter-form-field,
.projects-list-filter"
).
on
(
'keyup'
,
->
$
(
".projects-list-filter"
).
on
(
'keyup'
,
->
clearTimeout
(
@
timer
)
clearTimeout
(
@
timer
)
@
timer
=
setTimeout
(
Dashboard
.
filterResults
,
500
)
@
timer
=
setTimeout
(
Dashboard
.
filterResults
,
500
)
)
)
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
form
=
null
form
=
null
form
=
$
(
"form#project-filter-form"
)
form
=
$
(
"form#project-filter-form"
)
search
=
$
(
"
input#project-filter-form-field
"
).
val
()
search
=
$
(
"
.projects-list-filter
"
).
val
()
project_filter_url
=
form
.
attr
(
'action'
)
+
'?'
+
form
.
serialize
()
project_filter_url
=
form
.
attr
(
'action'
)
+
'?'
+
form
.
serialize
()
$
.
ajax
$
.
ajax
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
complete
:
->
complete
:
->
$
(
'.projects-list-holder'
).
fadeTo
(
250
,
1
)
$
(
'.projects-list-holder'
).
fadeTo
(
250
,
1
)
success
:
(
data
)
->
success
:
(
data
)
->
$
(
'.projects-list-holder
,.public-projects
'
).
replaceWith
(
data
.
html
)
$
(
'.projects-list-holder'
).
replaceWith
(
data
.
html
)
# Change url so if user reload a page - search results are saved
# Change url so if user reload a page - search results are saved
history
.
replaceState
{
page
:
project_filter_url
},
document
.
title
,
project_filter_url
history
.
replaceState
{
page
:
project_filter_url
},
document
.
title
,
project_filter_url
dataType
:
"json"
dataType
:
"json"
app/views/dashboard/_projects_head.html.haml
View file @
cf8a74be
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
.nav-controls
.nav-controls
=
form_tag
request
.
original_url
,
method: :get
,
class:
'project-filter-form'
,
id:
'project-filter-form'
do
|
f
|
=
form_tag
request
.
original_url
,
method: :get
,
class:
'project-filter-form'
,
id:
'project-filter-form'
do
|
f
|
=
search_field_tag
:filter_projects
,
params
[
:filter_projects
],
placeholder:
'Filter by name...'
,
class:
'project-filter-form-field form-control input-short'
,
spellcheck:
false
,
id:
'project-filter-form-field'
=
search_field_tag
:filter_projects
,
params
[
:filter_projects
],
placeholder:
'Filter by name...'
,
class:
'project-filter-form-field form-control input-short
projects-list-filter
'
,
spellcheck:
false
,
id:
'project-filter-form-field'
=
render
'explore/projects/dropdown'
=
render
'explore/projects/dropdown'
-
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
...
...
app/views/explore/projects/_projects.html.haml
View file @
cf8a74be
-
if
projects
.
any?
-
if
projects
.
any?
.p
ublic-projects
.p
rojects-list-holder
=
render
'shared/projects/list'
,
projects:
projects
=
render
'shared/projects/list'
,
projects:
projects
-
else
-
else
.nothing-here-block
.nothing-here-block
...
...
app/views/groups/_projects.html.haml
View file @
cf8a74be
.top-area
.top-area
.nav-controls
.nav-controls
=
form_tag
request
.
original_url
,
method: :get
,
class:
'project-filter-form'
,
id:
'project-filter-form'
do
|
f
|
=
form_tag
request
.
original_url
,
method: :get
,
class:
'project-filter-form'
,
id:
'project-filter-form'
do
|
f
|
=
search_field_tag
:filter_projects
,
params
[
:filter_projects
],
placeholder:
'Filter by name...'
,
class:
'input-short project-filter-form-field form-control'
,
spellcheck:
false
,
id:
'project-filter-form-field'
=
search_field_tag
:filter_projects
,
params
[
:filter_projects
],
placeholder:
'Filter by name...'
,
class:
'input-short project-filter-form-field form-control
projects-list-filter
'
,
spellcheck:
false
,
id:
'project-filter-form-field'
-
if
current_user
&&
current_user
.
can_create_project?
-
if
current_user
&&
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/projects/forks/index.html.haml
View file @
cf8a74be
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
==
#{
pluralize
(
@all_forks
.
size
,
'fork'
)
}
:
#{
full_count_title
}
==
#{
pluralize
(
@all_forks
.
size
,
'fork'
)
}
:
#{
full_count_title
}
.nav-controls
.nav-controls
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Search forks'
,
class:
'projects-list-filter form-control input-short'
,
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Search forks'
,
class:
'projects-list-filter
project-filter-form-field
form-control input-short'
,
spellcheck:
false
,
data:
{
'filter-selector'
=>
'span.namespace-name'
}
spellcheck:
false
,
data:
{
'filter-selector'
=>
'span.namespace-name'
}
.dropdown
.dropdown
...
...
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