summaryrefslogtreecommitdiffstats
path: root/client/components/lists/listBody.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-08-22 11:01:06 +0300
committerLauri Ojansivu <x@xet7.org>2018-08-22 11:01:06 +0300
commit676140f5c8887a5f710779150a55d5c68f63a8a0 (patch)
treec0f9d1d8711daf8a55dc5205b9f90cc1bacab43c /client/components/lists/listBody.js
parentb186561355792c13c3315859164a0bf9cde81494 (diff)
parent20757efc7e45d95681fff62c3064620d53abdfbc (diff)
downloadwekan-676140f5c8887a5f710779150a55d5c68f63a8a0.tar.gz
wekan-676140f5c8887a5f710779150a55d5c68f63a8a0.tar.bz2
wekan-676140f5c8887a5f710779150a55d5c68f63a8a0.zip
Merge branch 'devel'
Diffstat (limited to 'client/components/lists/listBody.js')
-rw-r--r--client/components/lists/listBody.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 83592a64..896bf178 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -333,21 +333,22 @@ BlazeComponent.extendComponent({
},
cards() {
+ const ownCardsIds = this.board.cards().map((card) => { return card.linkedId || card._id; });
return Cards.find({
boardId: this.selectedBoardId.get(),
swimlaneId: this.selectedSwimlaneId.get(),
listId: this.selectedListId.get(),
archived: false,
- linkedId: null,
- _id: {$nin: this.board.cards().map((card) => { return card.linkedId || card._id; })},
+ linkedId: {$nin: ownCardsIds},
+ _id: {$nin: ownCardsIds},
});
},
events() {
return [{
'change .js-select-boards'(evt) {
+ subManager.subscribe('board', $(evt.currentTarget).val());
this.selectedBoardId.set($(evt.currentTarget).val());
- subManager.subscribe('board', this.selectedBoardId.get());
},
'change .js-select-swimlanes'(evt) {
this.selectedSwimlaneId.set($(evt.currentTarget).val());
@@ -438,14 +439,14 @@ BlazeComponent.extendComponent({
results() {
const board = Boards.findOne(this.selectedBoardId.get());
- return board.searchCards(this.term.get(), true);
+ return board.searchCards(this.term.get(), false);
},
events() {
return [{
'change .js-select-boards'(evt) {
+ subManager.subscribe('board', $(evt.currentTarget).val());
this.selectedBoardId.set($(evt.currentTarget).val());
- subManager.subscribe('board', this.selectedBoardId.get());
},
'submit .js-search-term-form'(evt) {
evt.preventDefault();
@@ -461,7 +462,7 @@ BlazeComponent.extendComponent({
boardId: this.boardId,
sort: Lists.findOne(this.listId).cards().count(),
type: 'cardType-linkedCard',
- linkedId: card._id,
+ linkedId: card.linkedId || card._id,
});
Filter.addException(_id);
Popup.close();