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-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 988e0db  Allow lists.html to work with wild-cards
988e0db is described below

commit 988e0db47dd792572fee5f9006ca8f74d1fb010c
Author: Sebb <[email protected]>
AuthorDate: Tue Nov 16 23:50:49 2021 +0000

    Allow lists.html to work with wild-cards
    
    Partially addresses #137
---
 webui/js/ponymail.js           | 4 +++-
 webui/js/source/preferences.js | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index ccc3201..b770d3c 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -3229,7 +3229,9 @@ function init_preferences(state, json) {
         listview_list_lists(state, json);
         if (state && state.prime) {
             // If lists is accessible, show it
-            if (json.lists[current_domain] && 
json.lists[current_domain][current_list] != undefined) {
+            if (json.lists[current_domain] && (current_list == '*' || 
json.lists[current_domain][current_list] != undefined)) {
+                post_prime(state);
+            } else if  (current_domain == '*') { // assume a match
                 post_prime(state);
             } else { // otherwise, bork
                 if (current_list.length > 0 && (!json.lists[current_domain] || 
Object.keys(json.lists[current_domain]).length > 0)) {
diff --git a/webui/js/source/preferences.js b/webui/js/source/preferences.js
index 784d6d0..0e48005 100644
--- a/webui/js/source/preferences.js
+++ b/webui/js/source/preferences.js
@@ -72,7 +72,9 @@ function init_preferences(state, json) {
         listview_list_lists(state, json);
         if (state && state.prime) {
             // If lists is accessible, show it
-            if (json.lists[current_domain] && 
json.lists[current_domain][current_list] != undefined) {
+            if (json.lists[current_domain] && (current_list == '*' || 
json.lists[current_domain][current_list] != undefined)) {
+                post_prime(state);
+            } else if  (current_domain == '*') { // assume a match
                 post_prime(state);
             } else { // otherwise, bork
                 if (current_list.length > 0 && (!json.lists[current_domain] || 
Object.keys(json.lists[current_domain]).length > 0)) {

Reply via email to