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/11/13 16:20:51 UTC

[incubator-ponymail-foal] branch master updated (b4c6d4c -> ead725c)

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 b4c6d4c  Only add "Re: " if needed
     new 9f0008a  Move page title default into config.js
     new ead725c  Set window title to page title.

The 2 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/config.js                 | 3 ++-
 webui/js/ponymail.js               | 7 +++----
 webui/js/source/init.js            | 5 ++---
 webui/js/source/listview-header.js | 2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)

[incubator-ponymail-foal] 02/02: Set window title to page title.

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 ead725c233c546c1757c3bf308b0ecc04a1cd41d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Nov 13 17:20:41 2021 +0100

    Set window title to page title.
    
    This addresses #130
---
 webui/js/ponymail.js               | 2 +-
 webui/js/source/listview-header.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index 832ffa2..75cde7d 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -2181,7 +2181,7 @@ function listview_header(state, json) {
     if (json.searchParams.q && json.searchParams.q.length || (json.searchParams.d || "").match(/=/)) {
         list_title = "Custom search";
     }
-
+    document.title = list_title + " - " + prefs.title;
     document.getElementById('listview_title').innerText = list_title + ":";
     let download = new HTML('button', {
         title: 'Download as mbox archive',
diff --git a/webui/js/source/listview-header.js b/webui/js/source/listview-header.js
index 2ee9984..53211e3 100644
--- a/webui/js/source/listview-header.js
+++ b/webui/js/source/listview-header.js
@@ -38,7 +38,7 @@ function listview_header(state, json) {
     if (json.searchParams.q && json.searchParams.q.length || (json.searchParams.d || "").match(/=/)) {
         list_title = "Custom search";
     }
-
+    document.title = list_title + " - " + prefs.title;
     document.getElementById('listview_title').innerText = list_title + ":";
     let download = new HTML('button', {
         title: 'Download as mbox archive',

[incubator-ponymail-foal] 01/02: Move page title default into config.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 9f0008abe724d117b7d0d456777ffa9d837d007d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Nov 13 17:18:45 2021 +0100

    Move page title default into config.js
---
 webui/js/config.js      | 3 ++-
 webui/js/ponymail.js    | 5 ++---
 webui/js/source/init.js | 5 ++---
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/webui/js/config.js b/webui/js/config.js
index db563d9..08bbf09 100644
--- a/webui/js/config.js
+++ b/webui/js/config.js
@@ -62,7 +62,8 @@ var prefs = {
     hideStats: 'yes',               // Hide the email statistics window?
     theme: 'default',               // Set to 'social' to default to the social theme
     loggedIn: false,
-    UTC: true,                      // Use UTC for timestamps in UI. If false, use browser local time.
+    UTC: false,                     // Use UTC for timestamps in UI. If false, use browser local time.
+    title: "Apache Pony Mail"       // Default browser window title
 }
 
 // array of prefs we have now. This is needed in case we change/break the existing
diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index 91a2c5f..832ffa2 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -1644,7 +1644,6 @@ function showCalendarPicker(parent, seedDate) {
 ******************************************/
 
 var ponymail_version = "1.0.1-Foal" // Current version of Pony Mail
-var ponymail_name = "Pony Mail" // name of archive (set to "Foo's mail archive" or whatever)
 
 var apiURL = ''; // external API URL. Usually left blank.
 
@@ -1676,10 +1675,10 @@ var collated_json = {};
 
 console.log("/******* Apache Pony Mail (Foal v/%s) Initializing ********/".format(ponymail_version))
 // Adjust titles:
-document.title = ponymail_name;
+document.title = prefs.title;
 let titles = document.getElementsByClassName("title");
 for (var i in titles) {
-    titles[i].innerText = ponymail_name;
+    titles[i].innerText = prefs.title;
 }
 
 // check local storage for settings
diff --git a/webui/js/source/init.js b/webui/js/source/init.js
index 411f1ec..e604e03 100644
--- a/webui/js/source/init.js
+++ b/webui/js/source/init.js
@@ -16,7 +16,6 @@
  */
 
 var ponymail_version = "1.0.1-Foal" // Current version of Pony Mail
-var ponymail_name = "Pony Mail" // name of archive (set to "Foo's mail archive" or whatever)
 
 var apiURL = ''; // external API URL. Usually left blank.
 
@@ -48,10 +47,10 @@ var collated_json = {};
 
 console.log("/******* Apache Pony Mail (Foal v/%s) Initializing ********/".format(ponymail_version))
 // Adjust titles:
-document.title = ponymail_name;
+document.title = prefs.title;
 let titles = document.getElementsByClassName("title");
 for (var i in titles) {
-    titles[i].innerText = ponymail_name;
+    titles[i].innerText = prefs.title;
 }
 
 // check local storage for settings