diff options
author | Sam X. Chen <sam.xi.chen@gmail.com> | 2019-10-19 00:28:49 -0400 |
---|---|---|
committer | Sam X. Chen <sam.xi.chen@gmail.com> | 2019-10-19 00:28:49 -0400 |
commit | 32f50e16586696ec7d100ce0438d1030ae1f606e (patch) | |
tree | e5e5e75b82b2de074e8b2e3aea8cc4c23e54d71f /client | |
parent | d2d4840758b0f5aed7feb4f6a459bb2b2d1a3f0b (diff) | |
download | wekan-32f50e16586696ec7d100ce0438d1030ae1f606e.tar.gz wekan-32f50e16586696ec7d100ce0438d1030ae1f606e.tar.bz2 wekan-32f50e16586696ec7d100ce0438d1030ae1f606e.zip |
Add Feature: allow user to search Lists in Board
Diffstat (limited to 'client')
-rw-r--r-- | client/components/sidebar/sidebarFilters.jade | 3 | ||||
-rw-r--r-- | client/components/sidebar/sidebarFilters.js | 4 | ||||
-rw-r--r-- | client/components/sidebar/sidebarSearches.jade | 4 | ||||
-rw-r--r-- | client/components/sidebar/sidebarSearches.js | 5 |
4 files changed, 13 insertions, 3 deletions
diff --git a/client/components/sidebar/sidebarFilters.jade b/client/components/sidebar/sidebarFilters.jade index 0a68719e..ff2cd948 100644 --- a/client/components/sidebar/sidebarFilters.jade +++ b/client/components/sidebar/sidebarFilters.jade @@ -6,7 +6,8 @@ template(name="filterSidebar") ul.sidebar-list span {{_ 'list-filter-label'}} - input.js-list-filter(type="text") + form.js-list-filter + input(type="text") ul.sidebar-list li(class="{{#if Filter.labelIds.isSelected undefined}}active{{/if}}") a.name.js-toggle-label-filter diff --git a/client/components/sidebar/sidebarFilters.js b/client/components/sidebar/sidebarFilters.js index ee76ef37..ee0176b9 100644 --- a/client/components/sidebar/sidebarFilters.js +++ b/client/components/sidebar/sidebarFilters.js @@ -4,9 +4,9 @@ BlazeComponent.extendComponent({ events() { return [ { - 'change .js-list-filter'(evt) { + 'submit .js-list-filter'(evt) { evt.preventDefault(); - Filter.lists.set(this.find('.js-list-filter').value.trim()); + Filter.lists.set(this.find('.js-list-filter input').value.trim()); }, 'click .js-toggle-label-filter'(evt) { evt.preventDefault(); diff --git a/client/components/sidebar/sidebarSearches.jade b/client/components/sidebar/sidebarSearches.jade index 96877c50..4ee7fc9c 100644 --- a/client/components/sidebar/sidebarSearches.jade +++ b/client/components/sidebar/sidebarSearches.jade @@ -2,6 +2,10 @@ template(name="searchSidebar") form.js-search-term-form input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus dir="auto") .list-body.js-perfect-scrollbar + .minilists.clearfix.js-minilists + each (lists) + a.minilist-wrapper.js-minilist(href=absoluteUrl) + +minilist(this) .minicards.clearfix.js-minicards each (results) a.minicard-wrapper.js-minicard(href=absoluteUrl) diff --git a/client/components/sidebar/sidebarSearches.js b/client/components/sidebar/sidebarSearches.js index 8944c04e..02677260 100644 --- a/client/components/sidebar/sidebarSearches.js +++ b/client/components/sidebar/sidebarSearches.js @@ -8,6 +8,11 @@ BlazeComponent.extendComponent({ return currentBoard.searchCards(this.term.get()); }, + lists() { + const currentBoard = Boards.findOne(Session.get('currentBoard')); + return currentBoard.searchLists(this.term.get()); + }, + events() { return [ { |