ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject incubator-ponymail git commit: Fix up commit 7834846cd4d4ed8b9e621c802f874b587b7d9cdc
Date Mon, 23 Jan 2017 23:01:32 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master f3627cd4b -> 4cd8921f9


Fix up commit 7834846cd4d4ed8b9e621c802f874b587b7d9cdc

This caused problems clearing the search context

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

Branch: refs/heads/master
Commit: 4cd8921f9e73f39c7910caba93956d711bc9012b
Parents: f3627cd
Author: Sebb <sebb@apache.org>
Authored: Mon Jan 23 23:01:20 2017 +0000
Committer: Sebb <sebb@apache.org>
Committed: Mon Jan 23 23:01:20 2017 +0000

----------------------------------------------------------------------
 site/js/dev/ponymail_assign_vars.js |  3 ++-
 site/js/dev/ponymail_ngrams.js      |  2 +-
 site/js/dev/ponymail_pagebuilder.js |  5 +++--
 site/js/dev/ponymail_trends.js      |  2 +-
 site/js/ponymail.js                 | 12 +++++++-----
 5 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/4cd8921f/site/js/dev/ponymail_assign_vars.js
----------------------------------------------------------------------
diff --git a/site/js/dev/ponymail_assign_vars.js b/site/js/dev/ponymail_assign_vars.js
index f9709c7..068a563 100644
--- a/site/js/dev/ponymail_assign_vars.js
+++ b/site/js/dev/ponymail_assign_vars.js
@@ -25,7 +25,8 @@ var d_ppp = 15; // results per page
 var c_page = 0; // current page position for list view
 var open_emails = [] // cache index for loaded emails
 var list_year = {}
-var current_retention = "lte=1M" // default timespan for list view
+var DEFAULT_RETENTION = "lte=1M" // default timespan for list view
+var current_retention = DEFAULT_RETENTION
 var current_cal_min = 1997 // don't go further back than 1997 in case everything blows up,
date-wise
 var keywords = ""
 var current_thread = 0 // marker for list view; currently open thread/email

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/4cd8921f/site/js/dev/ponymail_ngrams.js
----------------------------------------------------------------------
diff --git a/site/js/dev/ponymail_ngrams.js b/site/js/dev/ponymail_ngrams.js
index a35a131..264cccc 100644
--- a/site/js/dev/ponymail_ngrams.js
+++ b/site/js/dev/ponymail_ngrams.js
@@ -251,7 +251,7 @@ function loadNgrams() {
     
     // default to 1 month view if nothing else is supplied
     if (!dspan || dspan.length == 0) {
-        dspan = "lte=1M"
+        dspan = DEFAULT_RETENTION
     }
     
     // figure out when this is and what the double is (for comparisons)

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/4cd8921f/site/js/dev/ponymail_pagebuilder.js
----------------------------------------------------------------------
diff --git a/site/js/dev/ponymail_pagebuilder.js b/site/js/dev/ponymail_pagebuilder.js
index 4617fb3..edf1dfd 100644
--- a/site/js/dev/ponymail_pagebuilder.js
+++ b/site/js/dev/ponymail_pagebuilder.js
@@ -335,6 +335,7 @@ function buildPage(json, state) {
 // getListInfo: Renders the top ML index
 function getListInfo(list, xdomain, nopush) {
     current_query = ""
+    current_retention = DEFAULT_RETENTION
     var dealtwithit = false
     if (xdomain && xdomain.search("utm_source=opensearch") != -1) {
         var strs = xdomain.split(/&/)
@@ -354,7 +355,7 @@ function getListInfo(list, xdomain, nopush) {
         }
         nopush = true
         dealtwithit = true
-        search(current_query, "lte=1M", true, true)
+        search(current_query, DEFAULT_RETENTION, true, true)
     }
     else if (xdomain && xdomain != "") {
         if (xdomain.length <= 1) {
@@ -547,7 +548,7 @@ function getListInfo(list, xdomain, nopush) {
             kiddos[n].setAttribute("class", "label label-default label-hover")
         }
         document.getElementById('listtitle').innerHTML = list + ", last month <a href='api/atom.lua?list="
+ list + "'><img src='images/atom.png'></a>"
-        if (current_query == "" && current_retention == "") {
+        if (current_query == "" && (current_retention == "" || current_retention
== DEFAULT_RETENTION)) {
             global_deep = false
             current_query = ""
             GetAsync("/api/stats.lua?list=" + listname + "&domain=" + domain, null, buildPage)

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/4cd8921f/site/js/dev/ponymail_trends.js
----------------------------------------------------------------------
diff --git a/site/js/dev/ponymail_trends.js b/site/js/dev/ponymail_trends.js
index 7f134d9..d1a27c9 100644
--- a/site/js/dev/ponymail_trends.js
+++ b/site/js/dev/ponymail_trends.js
@@ -310,7 +310,7 @@ function gatherTrends() {
     }
     // default to 1 month view if nothing else is supplied
     if (!dspan || dspan.length == 0) {
-        dspan = "lte=1M"
+        dspan = DEFAULT_RETENTION
     }
     // figure out when this is and what the double is (for comparisons)
     var xa = datePickerDouble(dspan)

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/4cd8921f/site/js/ponymail.js
----------------------------------------------------------------------
diff --git a/site/js/ponymail.js b/site/js/ponymail.js
index d3f5699..444118d 100644
--- a/site/js/ponymail.js
+++ b/site/js/ponymail.js
@@ -33,7 +33,8 @@ var d_ppp = 15; // results per page
 var c_page = 0; // current page position for list view
 var open_emails = [] // cache index for loaded emails
 var list_year = {}
-var current_retention = "lte=1M" // default timespan for list view
+var DEFAULT_RETENTION = "lte=1M" // default timespan for list view
+var current_retention = DEFAULT_RETENTION
 var current_cal_min = 1997 // don't go further back than 1997 in case everything blows up,
date-wise
 var keywords = ""
 var current_thread = 0 // marker for list view; currently open thread/email
@@ -3544,7 +3545,7 @@ function loadNgrams() {
     
     // default to 1 month view if nothing else is supplied
     if (!dspan || dspan.length == 0) {
-        dspan = "lte=1M"
+        dspan = DEFAULT_RETENTION
     }
     
     // figure out when this is and what the double is (for comparisons)
@@ -3931,6 +3932,7 @@ function buildPage(json, state) {
 // getListInfo: Renders the top ML index
 function getListInfo(list, xdomain, nopush) {
     current_query = ""
+    current_retention = DEFAULT_RETENTION
     var dealtwithit = false
     if (xdomain && xdomain.search("utm_source=opensearch") != -1) {
         var strs = xdomain.split(/&/)
@@ -3950,7 +3952,7 @@ function getListInfo(list, xdomain, nopush) {
         }
         nopush = true
         dealtwithit = true
-        search(current_query, "lte=1M", true, true)
+        search(current_query, DEFAULT_RETENTION, true, true)
     }
     else if (xdomain && xdomain != "") {
         if (xdomain.length <= 1) {
@@ -4143,7 +4145,7 @@ function getListInfo(list, xdomain, nopush) {
             kiddos[n].setAttribute("class", "label label-default label-hover")
         }
         document.getElementById('listtitle').innerHTML = list + ", last month <a href='api/atom.lua?list="
+ list + "'><img src='images/atom.png'></a>"
-        if (current_query == "" && current_retention == "") {
+        if (current_query == "" && (current_retention == "" || current_retention
== DEFAULT_RETENTION)) {
             global_deep = false
             current_query = ""
             GetAsync("/api/stats.lua?list=" + listname + "&domain=" + domain, null, buildPage)
@@ -5048,7 +5050,7 @@ function gatherTrends() {
     }
     // default to 1 month view if nothing else is supplied
     if (!dspan || dspan.length == 0) {
-        dspan = "lte=1M"
+        dspan = DEFAULT_RETENTION
     }
     // figure out when this is and what the double is (for comparisons)
     var xa = datePickerDouble(dspan)


Mime
View raw message