You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/09/06 08:59:17 UTC

[1/2] incubator-ponymail git commit: set font for headers

Repository: incubator-ponymail
Updated Branches:
  refs/heads/coffee-and-cake 5ad48831f -> 1820d0b7a


set font for headers


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/cc660d25
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/cc660d25
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/cc660d25

Branch: refs/heads/coffee-and-cake
Commit: cc660d25118ec84cb62d75206989dee3adfea2ea
Parents: 5ad4883
Author: Daniel Gruno <hu...@apache.org>
Authored: Tue Sep 6 10:58:27 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Tue Sep 6 10:58:27 2016 +0200

----------------------------------------------------------------------
 site/css/ponymail2.css | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/cc660d25/site/css/ponymail2.css
----------------------------------------------------------------------
diff --git a/site/css/ponymail2.css b/site/css/ponymail2.css
index a51dd52..d071597 100644
--- a/site/css/ponymail2.css
+++ b/site/css/ponymail2.css
@@ -416,6 +416,8 @@ a {
     margin-left: -5px;
     padding-left: 5px;
     border-top-right-radius: 4px;
+    font-family: sans-serif;
+    font-size: 95%;
 }
 
 .email_header_buttons {


[2/2] incubator-ponymail git commit: regen JS

Posted by hu...@apache.org.
regen JS


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/1820d0b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/1820d0b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/1820d0b7

Branch: refs/heads/coffee-and-cake
Commit: 1820d0b7a07a729936e9ee1bce41bfbee8373a75
Parents: cc660d2
Author: Daniel Gruno <hu...@apache.org>
Authored: Tue Sep 6 10:58:34 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Tue Sep 6 10:58:34 2016 +0200

----------------------------------------------------------------------
 site/js/ponymail-coffee.js | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/1820d0b7/site/js/ponymail-coffee.js
----------------------------------------------------------------------
diff --git a/site/js/ponymail-coffee.js b/site/js/ponymail-coffee.js
index e1f7e22..c3b8156 100644
--- a/site/js/ponymail-coffee.js
+++ b/site/js/ponymail-coffee.js
@@ -661,7 +661,7 @@ BasicEmailDisplay = (function() {
   BasicEmailDisplay.prototype.render = function(json, state) {
 
     /* Store email in cache if not there already */
-    var b, buttons, date_line, from_line, headers, htmlbody, list_line, pbutton, placeholder, rbutton, sbutton, subject_line;
+    var at, att_line, b, buttons, date_line, file, from_line, fsize, headers, htmlbody, j, len, link, list_line, pbutton, placeholder, rbutton, ref, sbutton, subject_line;
     if (!ponymail_stored_email[json.mid]) {
       ponymail_stored_email[json.mid] = json;
     }
@@ -713,6 +713,38 @@ BasicEmailDisplay = (function() {
     ]);
     headers.inject(list_line);
 
+    /* Attachments, if any */
+    if (isArray(json.attachments) && json.attachments.length > 0) {
+      at = [];
+      ref = json.attachments;
+      for (j = 0, len = ref.length; j < len; j++) {
+        file = ref[j];
+        fsize = file.size;
+        if (fsize > (1024 * 1024)) {
+          fsize = (fsize / (1024 * 1024)).toFixed(2) + "MB";
+        } else if (fsize > 1024) {
+          fsize = (fsize / 1024.).toFixed(2) + "KB";
+        } else {
+          fsize = fsize + " bytes";
+        }
+        link = new HTML('a', {
+          href: "api/email.lua?attachment=true&file=" + file.hash + "&id=" + json.mid,
+          style: {
+            marginRight: "8px"
+          }
+        }, file.filename + " (" + fsize + ")");
+        at.push(link);
+      }
+      att_line = new HTML('div', {}, [
+        new HTML('div', {
+          "class": "header_key"
+        }, "Attachments: "), new HTML('div', {
+          "class": "header_value"
+        }, at)
+      ]);
+      headers.inject(att_line);
+    }
+
     /* Action buttons */
 
     /* Permalink */