mirror of
https://github.com/wekan/wekan.git
synced 2026-02-07 00:51:47 +01:00
Add Feature: allow user to search Lists in Board
This commit is contained in:
parent
d2d4840758
commit
32f50e1658
6 changed files with 236 additions and 219 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue