mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Add two way binding of activities, comments, and attachments
This commit is contained in:
parent
49c415f023
commit
74a01691e3
4 changed files with 46 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue