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 2020/09/08 10:24:39 UTC

[incubator-ponymail-foal] branch master updated: Detect custom search tabs and fix title if so

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


The following commit(s) were added to refs/heads/master by this push:
     new 1d4293c  Detect custom search tabs and fix title if so
1d4293c is described below

commit 1d4293ceabd5e9ae9de863d52f8b76e145c2df03
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Sep 8 12:24:28 2020 +0200

    Detect custom search tabs and fix title if so
---
 webui/js/ponymail.js               | 5 +++++
 webui/js/source/listview-header.js | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index 37b407e..d76a5cb 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -2013,6 +2013,11 @@ function listview_header(state, json) {
     } else {
       list_title += ", past month";
     }
+
+    if (json.searchParams.q && json.searchParams.q.length || (json.searchParams.d||"").match(/=/)) {
+        list_title = "Custom search";
+    }
+
     document.getElementById('listview_title').innerText = list_title + ":";
     let download = new HTML('button', { title: 'Download as mbox archive', download: 'true'}, new HTML('span', {class: 'glyphicon glyphicon-save'}, " "));
     document.getElementById('listview_title').inject(download);
diff --git a/webui/js/source/listview-header.js b/webui/js/source/listview-header.js
index 91ebf40..e68f6fa 100644
--- a/webui/js/source/listview-header.js
+++ b/webui/js/source/listview-header.js
@@ -35,6 +35,11 @@ function listview_header(state, json) {
     } else {
       list_title += ", past month";
     }
+
+    if (json.searchParams.q && json.searchParams.q.length || (json.searchParams.d||"").match(/=/)) {
+        list_title = "Custom search";
+    }
+
     document.getElementById('listview_title').innerText = list_title + ":";
     let download = new HTML('button', { title: 'Download as mbox archive', download: 'true'}, new HTML('span', {class: 'glyphicon glyphicon-save'}, " "));
     document.getElementById('listview_title').inject(download);