5bb6a85b90
Reuse same search form and behavior for dashboard#projects, group#projects and admin#projects. Repsect all other options like sorting, personal filter when search projects by name. Create FilterableList JS class to handle identical behaviour of projects and groups lists. This change also makes filtering and sorting availabe on explore#projects and explore#groups no matter if you are logged in or not. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
15 lines
514 B
JavaScript
15 lines
514 B
JavaScript
import FilterableList from './filterable_list';
|
|
|
|
/**
|
|
* Makes search request for projects when user types a value in the search input.
|
|
* Updates the html content of the page with the received one.
|
|
*/
|
|
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');
|
|
|
|
new FilterableList(form, filter, holder);
|
|
}
|
|
}
|