summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2015-09-20 15:55:23 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2015-09-20 16:49:11 +0200
commitf4a68a0f7d5d7f4d2ca84dfa2d4ecf85a2f838a6 (patch)
tree6848b6cfebbe928f1bdc1e04128680124f8bbd88 /client/components/cards
parentec92f84f41dddf8826b5cf68e123a402599185e5 (diff)
downloadwekan-f4a68a0f7d5d7f4d2ca84dfa2d4ecf85a2f838a6.tar.gz
wekan-f4a68a0f7d5d7f4d2ca84dfa2d4ecf85a2f838a6.tar.bz2
wekan-f4a68a0f7d5d7f4d2ca84dfa2d4ecf85a2f838a6.zip
Fix Popup.afterCommit
We need to use "function() {}" instead of the ES6 style "() {}" with popup.afterCommit because we need the original value of "this" inside the callback.
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/attachments.js2
-rw-r--r--client/components/cards/cardDetails.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/client/components/cards/attachments.js b/client/components/cards/attachments.js
index 5b81f115..ea621a74 100644
--- a/client/components/cards/attachments.js
+++ b/client/components/cards/attachments.js
@@ -1,7 +1,7 @@
Template.attachmentsGalery.events({
'click .js-add-attachment': Popup.open('cardAttachments'),
'click .js-confirm-delete': Popup.afterConfirm('attachmentDelete',
- () => {
+ function() {
Attachments.remove(this._id);
Popup.close();
}
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 6ea6e777..58ce28e4 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -152,10 +152,10 @@ Template.moveCardPopup.events({
});
Template.cardMorePopup.events({
- 'click .js-delete': Popup.afterConfirm('cardDelete', () => {
+ 'click .js-delete': Popup.afterConfirm('cardDelete', function() {
Popup.close();
Cards.remove(this._id);
- Utils.goBoardId(this.board()._id);
+ Utils.goBoardId(this.boardId);
}),
});