ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [incubator-ponymail] branch master updated: Enh: display buttons even if no mails are found in a month
Date Mon, 16 Jul 2018 18:47:24 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d44184  Enh: display buttons even if no mails are found in a month
5d44184 is described below

commit 5d44184cea3892931cc5a68e7410a8e76affc52d
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Jul 16 19:47:22 2018 +0100

    Enh: display buttons even if no mails are found in a month
    
    This fixes #470
---
 CHANGELOG.md                        | 1 +
 site/js/dev/ponymail_pagebuilder.js | 3 ++-
 site/js/ponymail.js                 | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7fa930a..9d0140b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## Changes in 0.11-SNAPSHOT
+- Enh: display buttons even if no mails are found in a month (#470)
 - Bug: Javascript URLs must always use URL_BASE (#469)
 - Bug: setup.py uses ES library version to decide what features the database supports (#464)
 - Various tidyups suggested by Pylint
diff --git a/site/js/dev/ponymail_pagebuilder.js b/site/js/dev/ponymail_pagebuilder.js
index fd50f53..9696fda 100644
--- a/site/js/dev/ponymail_pagebuilder.js
+++ b/site/js/dev/ponymail_pagebuilder.js
@@ -314,7 +314,8 @@ function buildPage(json, state) {
 
     viewModes[prefs.displayMode].list(json, 0, 0, state ? state.deep : false);
     if (!json.emails || !json.emails.length || json.emails.length == 0) {
-        document.getElementById('emails').innerHTML = "<h3>No emails found that fit
the search criteria</h3>"
+        // prepend the message rather than replacing the buttons
+        document.getElementById('emails').innerHTML = "<h3>No emails found that fit
the search criteria</h3>" + document.getElementById('emails').innerHTML
     }
     if (json.private && json.private == true) {
         document.getElementById('emails').innerHTML += "<h4>Looks like you don't have
access to this archive. Maybe you need to be logged in?</h4>"
diff --git a/site/js/ponymail.js b/site/js/ponymail.js
index b4f23a3..284e47b 100644
--- a/site/js/ponymail.js
+++ b/site/js/ponymail.js
@@ -3959,7 +3959,8 @@ function buildPage(json, state) {
 
     viewModes[prefs.displayMode].list(json, 0, 0, state ? state.deep : false);
     if (!json.emails || !json.emails.length || json.emails.length == 0) {
-        document.getElementById('emails').innerHTML = "<h3>No emails found that fit
the search criteria</h3>"
+        // prepend the message rather than replacing the buttons
+        document.getElementById('emails').innerHTML = "<h3>No emails found that fit
the search criteria</h3>" + document.getElementById('emails').innerHTML
     }
     if (json.private && json.private == true) {
         document.getElementById('emails').innerHTML += "<h4>Looks like you don't have
access to this archive. Maybe you need to be logged in?</h4>"


Mime
View raw message