mirror of
https://github.com/wekan/wekan.git
synced 2026-01-08 02:28:50 +01:00
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.
This commit is contained in:
parent
ec92f84f41
commit
f4a68a0f7d
4 changed files with 5 additions and 5 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue