diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2019-02-23 16:36:29 +0100 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2019-02-24 00:05:00 +0100 |
commit | 0fec7115451ba3b49442965c8160df4911157601 (patch) | |
tree | 12364d6c96f0900aea318b16863a246b6c6dd9ee /client/components/lists/listBody.js | |
parent | 7a6afb8aea2c3398ec0fe34d664398bd94cac90a (diff) | |
download | wekan-0fec7115451ba3b49442965c8160df4911157601.tar.gz wekan-0fec7115451ba3b49442965c8160df4911157601.tar.bz2 wekan-0fec7115451ba3b49442965c8160df4911157601.zip |
Prepare to create card from template
Diffstat (limited to 'client/components/lists/listBody.js')
-rw-r--r-- | client/components/lists/listBody.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 66d056c4..e6849eb2 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -456,6 +456,7 @@ BlazeComponent.extendComponent({ archived: false, linkedId: {$nin: ownCardsIds}, _id: {$nin: ownCardsIds}, + type: {$nin: ['template-card']}, }); }, @@ -523,16 +524,16 @@ BlazeComponent.extendComponent({ }, onCreated() { - const isTemplateSearch = $(Popup._getTopStack().openerElement).hasClass('js-search-template'); + this.isTemplateSearch = $(Popup._getTopStack().openerElement).hasClass('js-search-template'); let board = {}; - if (isTemplateSearch) { + if (this.isTemplateSearch) { board = Boards.findOne(Meteor.user().profile.templatesBoardId); } else { // Prefetch first non-current board id board = Boards.findOne({ archived: false, 'members.userId': Meteor.userId(), - _id: {$ne: Session.get('currentBoard')}, + _id: {$nin: [Session.get('currentBoard'), Meteor.user().profile.templatesBoardId]}, }); } if (!board) { |