summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/lists')
-rw-r--r--client/components/lists/list.js4
-rw-r--r--client/components/lists/listsGroup.js13
2 files changed, 16 insertions, 1 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index e922a3fd..ce18ce14 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -18,7 +18,9 @@ BlazeComponent.extendComponent({
// callback, we basically solve all issues related to reactive updates. A
// comment below provides further details.
onRendered() {
- const boardComponent = this.parentComponent().parentComponent();
+ let boardComponent = this.parentComponent().parentComponent();
+ if (!boardComponent)
+ boardComponent = this.parentComponent();
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
const $cards = this.$('.js-minicards');
$cards.sortable({
diff --git a/client/components/lists/listsGroup.js b/client/components/lists/listsGroup.js
new file mode 100644
index 00000000..f94f681f
--- /dev/null
+++ b/client/components/lists/listsGroup.js
@@ -0,0 +1,13 @@
+BlazeComponent.extendComponent({
+ currentCardIsInThisList(listId, swimlaneId) {
+ const currentCard = Cards.findOne(Session.get('currentCard'));
+ const currentBoardId = Session.get('currentBoard');
+ const board = Boards.findOne(currentBoardId);
+ if (board.view === 'board-view-lists')
+ return currentCard && currentCard.listId === listId;
+ else if (board.view === 'board-view-swimlanes')
+ return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
+ else
+ return false;
+ },
+}).register('listsGroup');