summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2018-01-22 23:43:47 -0300
committerAndrés Manelli <andresmanelli@gmail.com>2018-01-22 23:43:47 -0300
commitaf119ff7c096e6cb077ba40e1eb0df8d3cc09821 (patch)
treed9b1a37c3da4a89d46fadf76568886c501927a99
parent7b04f14e3c33db0b1c3ecff003262e7689383a15 (diff)
downloadwekan-af119ff7c096e6cb077ba40e1eb0df8d3cc09821.tar.gz
wekan-af119ff7c096e6cb077ba40e1eb0df8d3cc09821.tar.bz2
wekan-af119ff7c096e6cb077ba40e1eb0df8d3cc09821.zip
Add card on first swimlane found
-rw-r--r--client/components/lists/listBody.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 2ca654b2..6cc94371 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -36,7 +36,14 @@ BlazeComponent.extendComponent({
const members = formComponent.members.get();
const labelIds = formComponent.labels.get();
- const swimlaneId = this.parentComponent().parentComponent().data()._id;
+ const boardId = this.data().board()._id;
+ const board = Boards.findOne(boardId);
+ let swimlaneId = '';
+ if (board.view === 'board-view-swimlanes')
+ swimlaneId = this.parentComponent().parentComponent().data()._id;
+ else
+ swimlaneId = Swimlanes.findOne({boardId})._id;
+
if (title) {
const _id = Cards.insert({
title,