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
8a910ba2
Commit
8a910ba2
authored
Mar 04, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve projects/groups list js code
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
1d49d065
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
app/assets/javascripts/filterable_list.js
app/assets/javascripts/filterable_list.js
+0
-2
app/assets/javascripts/groups_list.js
app/assets/javascripts/groups_list.js
+7
-4
app/assets/javascripts/projects_list.js
app/assets/javascripts/projects_list.js
+7
-4
No files found.
app/assets/javascripts/filterable_list.js
View file @
8a910ba2
...
@@ -7,8 +7,6 @@ export default class FilterableList {
...
@@ -7,8 +7,6 @@ export default class FilterableList {
this
.
filterForm
=
form
;
this
.
filterForm
=
form
;
this
.
listFilterElement
=
filter
;
this
.
listFilterElement
=
filter
;
this
.
listHolderElement
=
holder
;
this
.
listHolderElement
=
holder
;
this
.
initSearch
();
}
}
initSearch
()
{
initSearch
()
{
...
...
app/assets/javascripts/groups_list.js
View file @
8a910ba2
...
@@ -6,10 +6,13 @@ import FilterableList from './filterable_list';
...
@@ -6,10 +6,13 @@ import FilterableList from './filterable_list';
*/
*/
export
default
class
GroupsList
{
export
default
class
GroupsList
{
constructor
()
{
constructor
()
{
var
form
=
document
.
querySelector
(
'
form#group-filter-form
'
);
const
form
=
document
.
querySelector
(
'
form#group-filter-form
'
);
var
filter
=
document
.
querySelector
(
'
.js-groups-list-filter
'
);
const
filter
=
document
.
querySelector
(
'
.js-groups-list-filter
'
);
var
holder
=
document
.
querySelector
(
'
.js-groups-list-holder
'
);
const
holder
=
document
.
querySelector
(
'
.js-groups-list-holder
'
);
new
FilterableList
(
form
,
filter
,
holder
);
if
(
form
&&
filter
&&
holder
)
{
const
list
=
new
FilterableList
(
form
,
filter
,
holder
);
list
.
initSearch
();
}
}
}
}
}
app/assets/javascripts/projects_list.js
View file @
8a910ba2
...
@@ -6,10 +6,13 @@ import FilterableList from './filterable_list';
...
@@ -6,10 +6,13 @@ import FilterableList from './filterable_list';
*/
*/
export
default
class
ProjectsList
{
export
default
class
ProjectsList
{
constructor
()
{
constructor
()
{
var
form
=
document
.
querySelector
(
'
form#project-filter-form
'
);
const
form
=
document
.
querySelector
(
'
form#project-filter-form
'
);
var
filter
=
document
.
querySelector
(
'
.js-projects-list-filter
'
);
const
filter
=
document
.
querySelector
(
'
.js-projects-list-filter
'
);
var
holder
=
document
.
querySelector
(
'
.js-projects-list-holder
'
);
const
holder
=
document
.
querySelector
(
'
.js-projects-list-holder
'
);
new
FilterableList
(
form
,
filter
,
holder
);
if
(
form
&&
filter
&&
holder
)
{
const
list
=
new
FilterableList
(
form
,
filter
,
holder
);
list
.
initSearch
();
}
}
}
}
}
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