Commit 8a910ba2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve projects/groups list js code

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 1d49d065
......@@ -7,8 +7,6 @@ export default class FilterableList {
this.filterForm = form;
this.listFilterElement = filter;
this.listHolderElement = holder;
this.initSearch();
}
initSearch() {
......
......@@ -6,10 +6,13 @@ import FilterableList from './filterable_list';
*/
export default class GroupsList {
constructor() {
var form = document.querySelector('form#group-filter-form');
var filter = document.querySelector('.js-groups-list-filter');
var holder = document.querySelector('.js-groups-list-holder');
const form = document.querySelector('form#group-filter-form');
const filter = document.querySelector('.js-groups-list-filter');
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();
}
}
}
......@@ -6,10 +6,13 @@ import FilterableList from './filterable_list';
*/
export default class ProjectsList {
constructor() {
var form = document.querySelector('form#project-filter-form');
var filter = document.querySelector('.js-projects-list-filter');
var holder = document.querySelector('.js-projects-list-holder');
const form = document.querySelector('form#project-filter-form');
const filter = document.querySelector('.js-projects-list-filter');
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();
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment