summaryrefslogtreecommitdiffstats
path: root/client/components/lists/list.js
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-03-05 22:35:45 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-03-05 22:35:45 +0100
commit1bef3a3f8ff4eac43bf97cc8b86d85e618b0e2ef (patch)
tree83dea369ba9e07985e48a978bb19ccbd5812197e /client/components/lists/list.js
parent9d6d5e1a14c2a3ef22d90eaccffd352d06253117 (diff)
downloadwekan-1bef3a3f8ff4eac43bf97cc8b86d85e618b0e2ef.tar.gz
wekan-1bef3a3f8ff4eac43bf97cc8b86d85e618b0e2ef.tar.bz2
wekan-1bef3a3f8ff4eac43bf97cc8b86d85e618b0e2ef.zip
Fix card move with wrong swimlaneId
Diffstat (limited to 'client/components/lists/list.js')
-rw-r--r--client/components/lists/list.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index 043cb77c..868be2ce 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -67,7 +67,13 @@ BlazeComponent.extendComponent({
const nCards = MultiSelection.isActive() ? MultiSelection.count() : 1;
const sortIndex = calculateIndex(prevCardDom, nextCardDom, nCards);
const listId = Blaze.getData(ui.item.parents('.list').get(0))._id;
- const swimlaneId = Blaze.getData(ui.item.parents('.swimlane').get(0))._id;
+ const currentBoard = Boards.findOne(Session.get('currentBoard'));
+ let swimlaneId = '';
+ const boardView = Meteor.user().profile.boardView;
+ if (boardView === 'board-view-swimlanes')
+ swimlaneId = Blaze.getData(ui.item.parents('.swimlane').get(0))._id;
+ else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal'))
+ swimlaneId = currentBoard.getDefaultSwimline()._id;
// Normally the jquery-ui sortable library moves the dragged DOM element
// to its new position, which disrupts Blaze reactive updates mechanism