From ec80088330eff5f44e8cc8eaab04c83c259b9098 Mon Sep 17 00:00:00 2001 From: Giovane Date: Wed, 27 Jan 2016 15:44:17 -0200 Subject: Keep attachments when forwarding a mail #509 - Extract the attachment file box to a partial - Adds logic to show/hide the download arrow icon --- web-ui/app/js/mail_view/ui/attachment_list.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'web-ui/app/js/mail_view/ui/attachment_list.js') 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 65c7ee09..8428f4a3 100644 --- a/web-ui/app/js/mail_view/ui/attachment_list.js +++ b/web-ui/app/js/mail_view/ui/attachment_list.js @@ -50,13 +50,15 @@ define( this.renderAttachmentListView = function (data) { var currentHtml = this.select('attachmentListItem').html(); var item = this.buildAttachmentListItem(data); - this.select('attachmentListItem').html(currentHtml + '
  • ' + item + '
  • '); + this.select('attachmentListItem').html(currentHtml + item); }; this.buildAttachmentListItem = function (attachment) { - return '' + attachment.name + ' (' + viewHelper.formatSize(attachment.size) + ')' + - ''; + var attachmentData = {ident: attachment.ident, + encoding: attachment.encoding, + name: attachment.name, + size: attachment.size}; + return templates.compose.attachmentItem(attachmentData); }; this.addJqueryFileUploadConfig = function() { -- cgit v1.2.3