Merge pull request #316 from AlexanderS/fix/delete-card

Fix card deletion

This bug was introduced in b3851817.
This commit is contained in:
Maxime Quandalle 2015-09-20 16:57:00 +02:00
commit 33888f9fbb
4 changed files with 5 additions and 5 deletions

View file

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

View file

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

View file

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

View file

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