summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-02-23 16:36:29 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-02-24 00:05:00 +0100
commit0fec7115451ba3b49442965c8160df4911157601 (patch)
tree12364d6c96f0900aea318b16863a246b6c6dd9ee /client/components/lists
parent7a6afb8aea2c3398ec0fe34d664398bd94cac90a (diff)
downloadwekan-0fec7115451ba3b49442965c8160df4911157601.tar.gz
wekan-0fec7115451ba3b49442965c8160df4911157601.tar.bz2
wekan-0fec7115451ba3b49442965c8160df4911157601.zip
Prepare to create card from template
Diffstat (limited to 'client/components/lists')
-rw-r--r--client/components/lists/listBody.jade6
-rw-r--r--client/components/lists/listBody.js7
2 files changed, 6 insertions, 7 deletions
diff --git a/client/components/lists/listBody.jade b/client/components/lists/listBody.jade
index 4d7ec158..80ce70c0 100644
--- a/client/components/lists/listBody.jade
+++ b/client/components/lists/listBody.jade
@@ -96,11 +96,9 @@ template(name="searchCardPopup")
label {{_ 'boards'}}:
.link-board-wrapper
select.js-select-boards
+ option(value="")
each boards
- if $eq _id currentBoard._id
- option(value="{{_id}}" selected) {{_ 'current'}}
- else
- option(value="{{_id}}") {{title}}
+ option(value="{{_id}}") {{title}}
form.js-search-term-form
input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus)
.list-body.js-perfect-scrollbar.search-card-results
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) {