Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1B8EE200B89 for ; Tue, 6 Sep 2016 10:53:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1A2E4160AAD; Tue, 6 Sep 2016 08:53:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6B6A8160ABF for ; Tue, 6 Sep 2016 10:53:40 +0200 (CEST) Received: (qmail 5631 invoked by uid 500); 6 Sep 2016 08:53:39 -0000 Mailing-List: contact commits-help@ponymail.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ponymail.incubator.apache.org Delivered-To: mailing list commits@ponymail.incubator.apache.org Received: (qmail 5618 invoked by uid 99); 6 Sep 2016 08:53:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 08:53:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 03B84180655 for ; Tue, 6 Sep 2016 08:53:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id e8dXzjLruibD for ; Tue, 6 Sep 2016 08:53:38 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id F256A5FC19 for ; Tue, 6 Sep 2016 08:53:37 +0000 (UTC) Received: (qmail 5550 invoked by uid 99); 6 Sep 2016 08:53:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 08:53:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 714DEE025B; Tue, 6 Sep 2016 08:53:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: humbedooh@apache.org To: commits@ponymail.incubator.apache.org Date: Tue, 06 Sep 2016 08:53:37 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] incubator-ponymail git commit: add attachments to email headers archived-at: Tue, 06 Sep 2016 08:53:41 -0000 Repository: incubator-ponymail Updated Branches: refs/heads/coffee-and-cake 37f71028b -> 5ad48831f add attachments to email 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/f36bafbf Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/f36bafbf Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/f36bafbf Branch: refs/heads/coffee-and-cake Commit: f36bafbfd9fd9b833bce8a3df8eb439ab8288c56 Parents: 37f7102 Author: Daniel Gruno Authored: Tue Sep 6 10:49:52 2016 +0200 Committer: Daniel Gruno Committed: Tue Sep 6 10:49:52 2016 +0200 ---------------------------------------------------------------------- site/css/ponymail2.css | 4 ++-- site/js/coffee/email_display_basic.coffee | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/f36bafbf/site/css/ponymail2.css ---------------------------------------------------------------------- diff --git a/site/css/ponymail2.css b/site/css/ponymail2.css index d92f12e..a51dd52 100644 --- a/site/css/ponymail2.css +++ b/site/css/ponymail2.css @@ -426,13 +426,13 @@ a { } .header_key { padding-top: 0px; - width: 80px; + width: 100px; float: left; font-weight: bold; } .header_value { padding-top: 0px; - width: calc(100% - 90px); + width: calc(100% - 110px); float: left; } http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/f36bafbf/site/js/coffee/email_display_basic.coffee ---------------------------------------------------------------------- diff --git a/site/js/coffee/email_display_basic.coffee b/site/js/coffee/email_display_basic.coffee index c7a7756..3035835 100644 --- a/site/js/coffee/email_display_basic.coffee +++ b/site/js/coffee/email_display_basic.coffee @@ -119,6 +119,26 @@ class BasicEmailDisplay ]) headers.inject(list_line) + ### Attachments, if any ### + if isArray(json.attachments) and json.attachments.length > 0 + at = [] + for file in json.attachments + 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 ###