From 98082de00c79e764ee489397de9ec818f51f0dba Mon Sep 17 00:00:00 2001 From: NavaL Date: Sun, 27 Dec 2015 15:58:24 +0100 Subject: refactoring: moved upload logic out of the attachment icon Issue #548 --- web-ui/app/js/mixins/with_mail_edit_base.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'web-ui/app/js/mixins') diff --git a/web-ui/app/js/mixins/with_mail_edit_base.js b/web-ui/app/js/mixins/with_mail_edit_base.js index 1b5e8c52..f00ad5a3 100644 --- a/web-ui/app/js/mixins/with_mail_edit_base.js +++ b/web-ui/app/js/mixins/with_mail_edit_base.js @@ -23,10 +23,11 @@ define( 'page/events', 'views/i18n', 'mail_view/ui/send_button', - 'mail_view/ui/attachment', + 'mail_view/ui/attachment_icon', + 'mail_view/data/attachment_list', 'flight/lib/utils' ], - function(viewHelper, Recipients, DraftSaveStatus, events, i18n, SendButton, Attachment, utils) { + function(viewHelper, Recipients, DraftSaveStatus, events, i18n, SendButton, AttachmentIcon, AttachmentList, utils) { 'use strict'; function withMailEditBase() { @@ -35,6 +36,7 @@ define( bodyBox: '#text-box', sendButton: '#send-button', attachmentButton: '#attachment-button', + attachmentList: '#attachment-list', cancelButton: '#cancel-button', trashButton: '#trash-button', toArea: '#recipients-to-area', @@ -95,7 +97,8 @@ define( this.on(this.select('trashButton'), 'click', this.discardMail); SendButton.attachTo(this.select('sendButton')); - Attachment.attachTo(this.select('attachmentButton')); + AttachmentIcon.attachTo(this.select('attachmentButton')); + AttachmentList.attachTo(this.select('attachmentList')); this.warnSendButtonOfRecipients(); }; -- cgit v1.2.3