summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorSam X. Chen <sam.xi.chen@gmail.com>2019-10-19 00:28:49 -0400
committerSam X. Chen <sam.xi.chen@gmail.com>2019-10-19 00:28:49 -0400
commit32f50e16586696ec7d100ce0438d1030ae1f606e (patch)
treee5e5e75b82b2de074e8b2e3aea8cc4c23e54d71f /client
parentd2d4840758b0f5aed7feb4f6a459bb2b2d1a3f0b (diff)
downloadwekan-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.jade3
-rw-r--r--client/components/sidebar/sidebarFilters.js4
-rw-r--r--client/components/sidebar/sidebarSearches.jade4
-rw-r--r--client/components/sidebar/sidebarSearches.js5
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 [
{