summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mail_view/ui/mail_view.js
diff options
context:
space:
mode:
authorPatrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com>2014-11-03 17:35:12 -0300
committerPatrick Maia <pmaia@thoughtworks.com>2014-11-03 17:35:12 -0300
commitb1283a90007a85d4d3ac565d484334a77523ca63 (patch)
treef2e335be9bf40dcc19d650ea1d5e24d9f6e5de25 /web-ui/app/js/mail_view/ui/mail_view.js
parentc4d6f25902a28e7a17bb2bb2dce10db90b0ce8c8 (diff)
Card #30 - shows attachment information on mail visualization
Diffstat (limited to 'web-ui/app/js/mail_view/ui/mail_view.js')
-rw-r--r--web-ui/app/js/mail_view/ui/mail_view.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js
index fbf5c6ed..214b85d8 100644
--- a/web-ui/app/js/mail_view/ui/mail_view.js
+++ b/web-ui/app/js/mail_view/ui/mail_view.js
@@ -64,6 +64,10 @@ define(
encrypted = this.checkEncrypted(data.mail);
}
+ var attachments = _.map(data.mail.attachments, function(a){
+ return { 'encoding': a.headers['Content-Transfer-Encoding'], 'name': a.name, 'ident': a.ident };
+ });
+
this.$node.html(templates.mails.fullView({
header: data.mail.header,
body: [],
@@ -72,7 +76,8 @@ define(
tags: data.mail.tags,
encryptionStatus: encrypted,
signatureStatus: signed,
- features: features
+ features: features,
+ attachments: attachments
}));
this.$node.find('.bodyArea').html(viewHelpers.formatMailBody(data.mail));
@@ -197,6 +202,7 @@ define(
this.trigger(events.mail.want, {mail: this.attr.ident, caller: this});
};
+
this.after('initialize', function () {
this.on(this, events.mail.here, this.displayMail);
this.on(this, events.mail.notFound, this.openNoMessageSelectedPane);