Add two way binding of activities, comments, and attachments

This commit is contained in:
Andrés Manelli 2018-04-18 01:35:46 -03:00
parent 49c415f023
commit 74a01691e3
4 changed files with 46 additions and 10 deletions

View file

@ -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);