summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-09-20 16:57:00 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-09-20 16:57:00 +0200
commit33888f9fbbe61376c2390a9b6d07f123eda23624 (patch)
tree42acaa6d4be4eab951e9e2965ce9013e99a05347
parent9d5f473395e75d1c45940be43b06312085be4010 (diff)
parentf4a68a0f7d5d7f4d2ca84dfa2d4ecf85a2f838a6 (diff)
downloadwekan-33888f9fbbe61376c2390a9b6d07f123eda23624.tar.gz
wekan-33888f9fbbe61376c2390a9b6d07f123eda23624.tar.bz2
wekan-33888f9fbbe61376c2390a9b6d07f123eda23624.zip
Merge pull request #316 from AlexanderS/fix/delete-card
Fix card deletion This bug was introduced in b3851817.
-rw-r--r--client/components/boards/boardHeader.js2
-rw-r--r--client/components/cards/attachments.js2
-rw-r--r--client/components/cards/cardDetails.js4
-rw-r--r--client/components/lists/listHeader.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js
index 19b463ed..dbd76895 100644
--- a/client/components/boards/boardHeader.js
+++ b/client/components/boards/boardHeader.js
@@ -6,7 +6,7 @@ Template.boardMenuPopup.events({
},
'click .js-change-board-color': Popup.open('boardChangeColor'),
'click .js-change-language': Popup.open('changeLanguage'),
- 'click .js-archive-board ': Popup.afterConfirm('archiveBoard', () => {
+ 'click .js-archive-board ': Popup.afterConfirm('archiveBoard', function() {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
currentBoard.archive();
// XXX We should have some kind of notification on top of the page to
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);
}),
});
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js
index d4891fec..a893e873 100644
--- a/client/components/lists/listHeader.js
+++ b/client/components/lists/listHeader.js
@@ -34,7 +34,7 @@ Template.listActionPopup.events({
Popup.close();
},
'click .js-move-cards': Popup.open('listMoveCards'),
- 'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', () => {
+ 'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', function() {
this.allCards().forEach((card) => {
card.archive();
});