diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2018-04-18 01:35:46 -0300 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2018-08-11 00:07:29 +0200 |
commit | 74a01691e3490675d78cc4f24b3b99959e702c8d (patch) | |
tree | d1a47dcad555380da7cd412b594536acf86ac5b6 /client/components/activities | |
parent | 49c415f0239d6645c41881690acfb2a18395fae8 (diff) | |
download | wekan-74a01691e3490675d78cc4f24b3b99959e702c8d.tar.gz wekan-74a01691e3490675d78cc4f24b3b99959e702c8d.tar.bz2 wekan-74a01691e3490675d78cc4f24b3b99959e702c8d.zip |
Add two way binding of activities, comments, and attachments
Diffstat (limited to 'client/components/activities')
-rw-r--r-- | client/components/activities/comments.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/client/components/activities/comments.js b/client/components/activities/comments.js index 9b6aedd6..137b6872 100644 --- a/client/components/activities/comments.js +++ b/client/components/activities/comments.js @@ -21,11 +21,18 @@ BlazeComponent.extendComponent({ 'submit .js-new-comment-form'(evt) { const input = this.getInput(); const text = input.val().trim(); + const card = this.currentData(); + let boardId = card.boardId; + let cardId = card._id; + if (card.isImportedCard()) { + boardId = Cards.findOne(card.importedId).boardId; + cardId = card.importedId; + } if (text) { CardComments.insert({ text, - boardId: this.currentData().boardId, - cardId: this.currentData()._id, + boardId, + cardId, }); resetCommentInput(input); Tracker.flush(); |