From e001c3409a3911089adddad7bbd0e350aa152cb8 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sat, 13 Jun 2015 15:04:55 +0200 Subject: Fix card attachments Closes #192. --- client/components/cards/events.js | 42 --------------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 client/components/cards/events.js (limited to 'client/components/cards/events.js') diff --git a/client/components/cards/events.js b/client/components/cards/events.js deleted file mode 100644 index ca2ddb50..00000000 --- a/client/components/cards/events.js +++ /dev/null @@ -1,42 +0,0 @@ -Template.WindowAttachmentsModule.events({ - 'click .js-attach': Popup.open('cardAttachments'), - 'click .js-confirm-delete': Popup.afterConfirm('attachmentDelete', - function() { - Attachments.remove(this._id); - Popup.close(); - } - ), - // If we let this event bubble, Iron-Router will handle it and empty the - // page content, see #101. - 'click .js-open-viewer, click .js-download': function(event) { - event.stopPropagation(); - }, - 'click .js-add-cover': function() { - Cards.update(this.cardId, { $set: { coverId: this._id } }); - }, - 'click .js-remove-cover': function() { - Cards.update(this.cardId, { $unset: { coverId: '' } }); - } -}); - -Template.cardAttachmentsPopup.events({ - 'change .js-attach-file': function(evt) { - var card = this.card; - FS.Utility.eachFile(evt, function(f) { - var file = new FS.File(f); - - // set Ids - file.boardId = card.boardId; - file.cardId = card._id; - - // upload file - Attachments.insert(file); - - Popup.close(); - }); - }, - 'click .js-computer-upload': function(evt, t) { - t.find('.js-attach-file').click(); - evt.preventDefault(); - } -}); -- cgit v1.2.3-1-g7c22