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 6A0E3200BB1 for ; Thu, 3 Nov 2016 14:57:21 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 68A84160AFF; Thu, 3 Nov 2016 13:57:21 +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 8CC96160AFE for ; Thu, 3 Nov 2016 14:57:20 +0100 (CET) Received: (qmail 99021 invoked by uid 500); 3 Nov 2016 13:57:19 -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 99012 invoked by uid 99); 3 Nov 2016 13:57:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2016 13:57:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 044EBC0750 for ; Thu, 3 Nov 2016 13:57:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 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=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 71qRuC3aOtZY for ; Thu, 3 Nov 2016 13:57:17 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 7B5EE5F39A for ; Thu, 3 Nov 2016 13:57:17 +0000 (UTC) Received: (qmail 98989 invoked by uid 99); 3 Nov 2016 13:57:17 -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; Thu, 03 Nov 2016 13:57:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DEDC5E04EE; Thu, 3 Nov 2016 13:57:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sebb@apache.org To: commits@ponymail.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-ponymail git commit: Add option to change page when popup closes Date: Thu, 3 Nov 2016 13:57:16 +0000 (UTC) archived-at: Thu, 03 Nov 2016 13:57:21 -0000 Repository: incubator-ponymail Updated Branches: refs/heads/master 69385fe99 -> 5acb78c50 Add option to change page when popup closes Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/5acb78c5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/5acb78c5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/5acb78c5 Branch: refs/heads/master Commit: 5acb78c50f08800ef9ce01cccd2c74ec90c49d52 Parents: 69385fe Author: Sebb Authored: Thu Nov 3 13:57:05 2016 +0000 Committer: Sebb Committed: Thu Nov 3 13:57:05 2016 +0000 ---------------------------------------------------------------------- site/js/dev/ponymail_dom_helpers.js | 14 +++++++++++--- site/js/ponymail.js | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/5acb78c5/site/js/dev/ponymail_dom_helpers.js ---------------------------------------------------------------------- diff --git a/site/js/dev/ponymail_dom_helpers.js b/site/js/dev/ponymail_dom_helpers.js index 4f1868f..f08fb3e 100644 --- a/site/js/dev/ponymail_dom_helpers.js +++ b/site/js/dev/ponymail_dom_helpers.js @@ -225,7 +225,7 @@ function setPopup(pid, close) { // Pop-up message display thingy. Used for saying "email sent...I think!" -function popup(title, body, timeout, pid) { +function popup(title, body, timeout, pid, wloc) { var obj = document.getElementById('popupper') if (pid) { if (typeof(window.localStorage) !== "undefined") { @@ -238,17 +238,25 @@ function popup(title, body, timeout, pid) { if (obj) { obj.innerHTML = "" obj.style.display = 'block' - obj.innerHTML = "

" + title + "

" + body + "

Got it!

" + obj.innerHTML = "

" + title + "

" + body + "

Got it!

" if (pid) { obj.innerHTML += "
" } // hide popupper after N seconds, giving people enough time to read it. window.setTimeout(function() { - document.getElementById('popupper').style.display = 'none' + popup_close(wloc) }, (timeout ? timeout : 5) * 1000) } } +// close the popup and open new page if required +function popup_close(wloc){ + document.getElementById('popupper').style.display = 'none' + if (wloc) { + location.href = wloc + } +} + // function for determining if an email is open or not function openEmail() { kiddos = [] http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/5acb78c5/site/js/ponymail.js ---------------------------------------------------------------------- diff --git a/site/js/ponymail.js b/site/js/ponymail.js index 541a928..27a4776 100644 --- a/site/js/ponymail.js +++ b/site/js/ponymail.js @@ -1321,7 +1321,7 @@ function setPopup(pid, close) { // Pop-up message display thingy. Used for saying "email sent...I think!" -function popup(title, body, timeout, pid) { +function popup(title, body, timeout, pid, wloc) { var obj = document.getElementById('popupper') if (pid) { if (typeof(window.localStorage) !== "undefined") { @@ -1334,17 +1334,25 @@ function popup(title, body, timeout, pid) { if (obj) { obj.innerHTML = "" obj.style.display = 'block' - obj.innerHTML = "

" + title + "

" + body + "

Got it!

" + obj.innerHTML = "

" + title + "

" + body + "

Got it!

" if (pid) { obj.innerHTML += "
" } // hide popupper after N seconds, giving people enough time to read it. window.setTimeout(function() { - document.getElementById('popupper').style.display = 'none' + popup_close(wloc) }, (timeout ? timeout : 5) * 1000) } } +// close the popup and open new page if required +function popup_close(wloc){ + document.getElementById('popupper').style.display = 'none' + if (wloc) { + location.href = wloc + } +} + // function for determining if an email is open or not function openEmail() { kiddos = []