Fixed Remove Cover button gives JS error.

Thanks to tsukasa1989 and xet7 !

Fixes #3400
This commit is contained in:
Lauri Ojansivu 2020-12-21 18:32:00 +02:00
parent d62bed1536
commit 28850e5510

View file

@ -1,13 +1,4 @@
Template.attachmentsGalery.events({});
BlazeComponent.extendComponent({
isBoardAdmin() {
return Meteor.user().isBoardAdmin();
},
events() {
return [
{
Template.attachmentsGalery.events({
'click .js-add-attachment': Popup.open('cardAttachments'),
'click .js-confirm-delete': Popup.afterConfirm(
'attachmentDelete',
@ -52,10 +43,13 @@ BlazeComponent.extendComponent({
if (img.src === url && img.complete) rePosPopup();
else img.onload = rePosPopup;
},
});
Template.attachmentsGalery.helpers({
isBoardAdmin() {
return Meteor.user().isBoardAdmin();
},
];
},
}).register('attachmentsGalery');
});
Template.previewAttachedImagePopup.events({
'click .js-large-image-clicked'() {