summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2018-04-18 01:35:46 -0300
committerAndrés Manelli <andresmanelli@gmail.com>2018-08-11 00:07:29 +0200
commit74a01691e3490675d78cc4f24b3b99959e702c8d (patch)
treed1a47dcad555380da7cd412b594536acf86ac5b6 /client/components/cards
parent49c415f0239d6645c41881690acfb2a18395fae8 (diff)
downloadwekan-74a01691e3490675d78cc4f24b3b99959e702c8d.tar.gz
wekan-74a01691e3490675d78cc4f24b3b99959e702c8d.tar.bz2
wekan-74a01691e3490675d78cc4f24b3b99959e702c8d.zip
Add two way binding of activities, comments, and attachments
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/attachments.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/components/cards/attachments.js b/client/components/cards/attachments.js
index bc7d3979..1a4d5bb6 100644
--- a/client/components/cards/attachments.js
+++ b/client/components/cards/attachments.js
@@ -57,8 +57,13 @@ Template.cardAttachmentsPopup.events({
const card = this;
FS.Utility.eachFile(evt, (f) => {
const file = new FS.File(f);
- file.boardId = card.boardId;
- file.cardId = card._id;
+ if (card.isImportedCard()) {
+ file.boardId = Cards.findOne(card.importedId).boardId;
+ file.cardId = card.importedId;
+ } else {
+ file.boardId = card.boardId;
+ file.cardId = card._id;
+ }
file.userId = Meteor.userId();
const attachment = Attachments.insert(file);