diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2016-08-31 20:33:12 +0300 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2016-09-01 16:36:02 +0300 |
commit | e67a483752310e32bc4577c03dd9042565b71c0a (patch) | |
tree | d3a3d6c18e261db3b6e15ec6d70690d57df83dbe /app/assets/javascripts/todos.js | |
parent | 0ccdb41ced96c304658cf88b0869c5b78a4f15b7 (diff) |
Fixed project filtering
Diffstat (limited to 'app/assets/javascripts/todos.js')
-rw-r--r-- | app/assets/javascripts/todos.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/todos.js b/app/assets/javascripts/todos.js index a908f730954..23eda7d44ca 100644 --- a/app/assets/javascripts/todos.js +++ b/app/assets/javascripts/todos.js @@ -30,7 +30,7 @@ Todos.prototype.initFilters = function() { 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-action-search'), 'action_id'); @@ -40,11 +40,12 @@ }); }; - Todos.prototype.initFilterDropdown = function($dropdown, fieldName, isFilterable) { + Todos.prototype.initFilterDropdown = function($dropdown, fieldName, searchFields) { $dropdown.glDropdown({ selectable: true, - filterable: isFilterable, + filterable: searchFields ? true : false, fieldName: fieldName, + search: { fields: searchFields }, data: $dropdown.data('data'), clicked: function() { return $dropdown.closest('form.filter-form').submit(); |