summaryrefslogtreecommitdiff
path: root/web-ui/app/js/helpers/view_helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/helpers/view_helper.js')
-rw-r--r--web-ui/app/js/helpers/view_helper.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/web-ui/app/js/helpers/view_helper.js b/web-ui/app/js/helpers/view_helper.js
index 6755b891..a682ae5e 100644
--- a/web-ui/app/js/helpers/view_helper.js
+++ b/web-ui/app/js/helpers/view_helper.js
@@ -22,7 +22,7 @@ define(
'quoted-printable/quoted-printable',
'utf8/utf8'
],
- function(contentType, htmlWhitelister, i18n_lib, quotedPrintable, utf8) {
+ function(contentType, htmlWhitelister, i18n, quotedPrintable, utf8) {
'use strict';
function formatStatusClasses(ss) {
@@ -109,12 +109,15 @@ define(
}, 1);
}
- function quoteMail(mail) {
- return '\n\n' + mail.textPlainBody.replace(/^/mg, '> ');
+ function prependFrom(mail) {
+ return i18n(
+ 'On __date__, <__from__> wrote:\n',
+ {'date': new Date(mail.header.date).toString(), 'from': mail.header.from}
+ );
}
- function i18n(text) {
- return i18n_lib.get(text);
+ function quoteMail(mail) {
+ return '\n\n' + prependFrom(mail) + mail.textPlainBody.replace(/^/mg, '> ');
}
return {