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 2021/09/11 22:48:21 UTC

[incubator-ponymail-foal] branch master updated (14cb161 -> 763cea9)

This is an automated email from the ASF dual-hosted git repository.

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


    from 14cb161  Allow for graceful handling of processing errors
     new c5f9150  Only reload search on refresh button click, don't load preferences again
     new acc70c2  thread.html is usually without the .html in the URL
     new 763cea9  regen JS

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 webui/js/ponymail.js               | 16 +++++++++++-----
 webui/js/source/key-commands.js    |  2 +-
 webui/js/source/listview-header.js |  2 +-
 webui/js/source/primer.js          |  7 ++++++-
 4 files changed, 19 insertions(+), 8 deletions(-)

[incubator-ponymail-foal] 03/03: regen JS

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 763cea9105987545ce51298120f645460d9ea156
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Sep 11 17:48:09 2021 -0500

    regen JS
---
 webui/js/ponymail.js | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index d5152d7..20b8f5c 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -304,7 +304,7 @@ ponymail_diff_regex = new RegExp(
   "^-{3} .+?[\r\n]+" + // Starts with a "--- /foo/bar/baz"
   "^\\+{3} .+?[\r\n]+" + // Then a "+++ /foo/bar/baz"
   "(" + // Then one or more of...
-    "^@@ .+[\r\n]+" + // positioning
+    "^@@@? .+[\r\n]+" + // positioning
     "(^ .*[\r\n]*$){0,3}" + // diff header
     "(^[-+ ].*[\r\n]*)+" + // actual diff
     "(^ .*[\r\n]*$){0,3}" + // diff trailer
@@ -547,6 +547,7 @@ function toggle_quote(el) {
     }
 }
 
+
 /******************************************
  Fetched from source/composer.js
 ******************************************/
@@ -1713,7 +1714,7 @@ function hideWindows(force_all) {
     }
     
     // if viewing a single thread, disregard the collapses below - the won't make sense!
-    if (location.href.match(/thread\.html/)) return;
+    if (location.href.match(/thread(?:\.html)?/)) return;
     
     // Finally, check for other opened emails, close 'em all
     let placeholders = document.getElementsByClassName('email_placeholder');
@@ -2056,7 +2057,7 @@ function listview_header(state, json) {
     let cforward = new HTML('button', { onclick: 'listview_header({pos: %u}, current_json);'.format(pnext),  disabled: (first+per_page-1 >= blobs.length) ? 'true': null}, new HTML('span', {class: 'glyphicon glyphicon-chevron-right'}, " "));
     chevrons.inject(cforward);
     
-    let crefresh = new HTML('button', { onclick: 'parseURL();', title: 'Refresh results', style: {marginLeft: '8px'}}, new HTML('span', {class: 'glyphicon glyphicon-refresh'}, " "));
+    let crefresh = new HTML('button', { onclick: 'parseURL({noprefs: true});', title: 'Refresh results', style: {marginLeft: '8px'}}, new HTML('span', {class: 'glyphicon glyphicon-refresh'}, " "));
     chevrons.inject(crefresh);
     
     if (state && state.pos != undefined) {
@@ -2381,7 +2382,7 @@ function listview_threaded_element(thread, idx) {
     let as = new HTML('div', {class: 'listview_email_as'});
     
     let suba = new HTML('a', {},  eml.subject === '' ? '(No subject)' : eml.subject);
-    if (current_json.name == '*' || current_json.domain == '*') {
+    if (current_json.list.match(/\*/) || current_json.domain == '*') {
         let kbd = new HTML('kbd', {class: 'listview_kbd'}, eml.list_raw.replace(/[<>]/g, '').replace('.','@',1))
         suba = [kbd, suba];
     }
@@ -2874,7 +2875,12 @@ function parseURL(state) {
     state.query = query;
     state.date = month;
   }
-  primeListView(state);
+  // If hitting the refresh button, don't refresh preferences, just do the search.
+  if (state.noprefs) {
+      post_prime(state);
+  } else {
+      primeListView(state);
+  }
 };
 
 

[incubator-ponymail-foal] 02/03: thread.html is usually without the .html in the URL

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit acc70c2f98a349d5f0bde69bc49009fb679b4117
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Sep 11 17:47:58 2021 -0500

    thread.html is usually without the .html in the URL
---
 webui/js/source/key-commands.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webui/js/source/key-commands.js b/webui/js/source/key-commands.js
index 4c26e20..19ed423 100644
--- a/webui/js/source/key-commands.js
+++ b/webui/js/source/key-commands.js
@@ -92,7 +92,7 @@ function hideWindows(force_all) {
     }
     
     // if viewing a single thread, disregard the collapses below - the won't make sense!
-    if (location.href.match(/thread\.html/)) return;
+    if (location.href.match(/thread(?:\.html)?/)) return;
     
     // Finally, check for other opened emails, close 'em all
     let placeholders = document.getElementsByClassName('email_placeholder');

[incubator-ponymail-foal] 01/03: Only reload search on refresh button click, don't load preferences again

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c5f915005ff79bd2ae3ae683d2f861cbc4000ad1
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Sep 11 17:47:37 2021 -0500

    Only reload search on refresh button click, don't load preferences again
---
 webui/js/source/listview-header.js | 2 +-
 webui/js/source/primer.js          | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/webui/js/source/listview-header.js b/webui/js/source/listview-header.js
index e68f6fa..13353e5 100644
--- a/webui/js/source/listview-header.js
+++ b/webui/js/source/listview-header.js
@@ -69,7 +69,7 @@ function listview_header(state, json) {
     let cforward = new HTML('button', { onclick: 'listview_header({pos: %u}, current_json);'.format(pnext),  disabled: (first+per_page-1 >= blobs.length) ? 'true': null}, new HTML('span', {class: 'glyphicon glyphicon-chevron-right'}, " "));
     chevrons.inject(cforward);
     
-    let crefresh = new HTML('button', { onclick: 'parseURL();', title: 'Refresh results', style: {marginLeft: '8px'}}, new HTML('span', {class: 'glyphicon glyphicon-refresh'}, " "));
+    let crefresh = new HTML('button', { onclick: 'parseURL({noprefs: true});', title: 'Refresh results', style: {marginLeft: '8px'}}, new HTML('span', {class: 'glyphicon glyphicon-refresh'}, " "));
     chevrons.inject(crefresh);
     
     if (state && state.pos != undefined) {
diff --git a/webui/js/source/primer.js b/webui/js/source/primer.js
index 05f4e9e..4451dfe 100644
--- a/webui/js/source/primer.js
+++ b/webui/js/source/primer.js
@@ -124,7 +124,12 @@ function parseURL(state) {
     state.query = query;
     state.date = month;
   }
-  primeListView(state);
+  // If hitting the refresh button, don't refresh preferences, just do the search.
+  if (state.noprefs) {
+      post_prime(state);
+  } else {
+      primeListView(state);
+  }
 };