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 <[email protected]>
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);
+  }
 };
 
 

Reply via email to