summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
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) {