From 3c6b905d7e5b78e521b2e7692e5e32b7b0c226bc Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Mon, 8 Feb 2016 17:54:58 +0100 Subject: Revert "Issue #549 - Implemented remove attachment" This reverts commit 9442be5c230e286073244451189ffc05ae6c8083. --- web-ui/app/js/mail_view/ui/attachment_list.js | 20 ++------------------ web-ui/app/js/mail_view/ui/forward_box.js | 5 ++--- 2 files changed, 4 insertions(+), 21 deletions(-) (limited to 'web-ui') diff --git a/web-ui/app/js/mail_view/ui/attachment_list.js b/web-ui/app/js/mail_view/ui/attachment_list.js index 3d57ede5..b3b26710 100644 --- a/web-ui/app/js/mail_view/ui/attachment_list.js +++ b/web-ui/app/js/mail_view/ui/attachment_list.js @@ -19,11 +19,10 @@ define( [ 'views/templates', 'page/events', - 'helpers/view_helper', - 'helpers/monitored_ajax' + 'helpers/view_helper' ], - function (templates, events, viewHelper, monitoredAjax) { + function (templates, events, viewHelper) { 'use strict'; function attachmentList() { @@ -181,26 +180,11 @@ define( this.select('inputFileUpload').click(); }; - this.removeAttachments = function(event, data) { - var success = function() { - console.log('Success'); - }; - - var failure = function() { - console.log('Fail!!!!!'); - }; - - monitoredAjax(this, '/attachment/' + data.ident, { - type: 'DELETE' - }).done(success.bind(this)).fail(failure.bind(this)); - }; - this.after('initialize', function () { this.addJqueryFileUploadConfig(); this.on(document, events.mail.uploadedAttachment, this.showAttachment); this.on(document, events.mail.startUploadAttachment, this.startUpload); this.on(document, events.mail.appendAttachment, this.addAttachment); - this.on(document, events.mail.removeAttachment, this.removeAttachments); }); } diff --git a/web-ui/app/js/mail_view/ui/forward_box.js b/web-ui/app/js/mail_view/ui/forward_box.js index 5acef337..3d643b2f 100644 --- a/web-ui/app/js/mail_view/ui/forward_box.js +++ b/web-ui/app/js/mail_view/ui/forward_box.js @@ -56,7 +56,7 @@ define( self.trigger(document, events.mail.removeAttachment, {ident: ident}); event.preventDefault(); }); - + this.on(this.select('subjectDisplay'), 'click', this.showSubjectInput); this.select('recipientsDisplay').hide(); this.select('recipientsFields').show(); @@ -64,8 +64,7 @@ define( this.convertToRemovableAttachments = function(attachments) { return attachments.map(function(attachment) { - attachment.removable = false; // don't show this button until the bug is fixed - attachment.received = true; + attachment.removable = true; return attachment; }); }; -- cgit v1.2.3