Skip to content
Snippets Groups Projects
Unverified Commit e67a4837 authored by Luke Bennett's avatar Luke Bennett
Browse files

Fixed project filtering

parent 0ccdb41c
No related branches found
No related tags found
No related merge requests found
Loading
@@ -30,7 +30,7 @@
Loading
@@ -30,7 +30,7 @@
   
Todos.prototype.initFilters = function() { Todos.prototype.initFilters = function() {
new UsersSelect(); new UsersSelect();
this.initFilterDropdown($('.js-project-search'), 'project_id', true); this.initFilterDropdown($('.js-project-search'), 'project_id', ['text']);
this.initFilterDropdown($('.js-type-search'), 'type'); this.initFilterDropdown($('.js-type-search'), 'type');
this.initFilterDropdown($('.js-action-search'), 'action_id'); this.initFilterDropdown($('.js-action-search'), 'action_id');
   
Loading
@@ -40,11 +40,12 @@
Loading
@@ -40,11 +40,12 @@
}); });
}; };
   
Todos.prototype.initFilterDropdown = function($dropdown, fieldName, isFilterable) { Todos.prototype.initFilterDropdown = function($dropdown, fieldName, searchFields) {
$dropdown.glDropdown({ $dropdown.glDropdown({
selectable: true, selectable: true,
filterable: isFilterable, filterable: searchFields ? true : false,
fieldName: fieldName, fieldName: fieldName,
search: { fields: searchFields },
data: $dropdown.data('data'), data: $dropdown.data('data'),
clicked: function() { clicked: function() {
return $dropdown.closest('form.filter-form').submit(); return $dropdown.closest('form.filter-form').submit();
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment