You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2022/01/26 00:07:13 UTC

[incubator-ponymail-foal] branch master updated (6f80328 -> 25c8ff0)

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

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


    from 6f80328  multidict typedef has been fixed
     new 030caf1   Find parent link does not work
     new 25c8ff0  Update JS version

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/admin.html                    |  8 ++++----
 webui/index.html                    |  6 +++---
 webui/js/ponymail.js                | 24 ++++++++++++++----------
 webui/js/source/construct-thread.js |  4 ++--
 webui/js/source/primer.js           | 18 +++++++++++-------
 webui/list.html                     |  8 ++++----
 webui/oauth.html                    |  8 ++++----
 webui/thread.html                   |  8 ++++----
 8 files changed, 46 insertions(+), 38 deletions(-)

[incubator-ponymail-foal] 02/02: Update JS version

Posted by se...@apache.org.
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

commit 25c8ff0e284e99c6b5d838ebba40637edae84e72
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jan 26 00:04:52 2022 +0000

    Update JS version
---
 webui/admin.html     |  8 ++++----
 webui/index.html     |  6 +++---
 webui/js/ponymail.js | 24 ++++++++++++++----------
 webui/list.html      |  8 ++++----
 webui/oauth.html     |  8 ++++----
 webui/thread.html    |  8 ++++----
 6 files changed, 33 insertions(+), 29 deletions(-)

diff --git a/webui/admin.html b/webui/admin.html
index 6c448db..aa4f0d6 100644
--- a/webui/admin.html
+++ b/webui/admin.html
@@ -25,7 +25,7 @@ the License. -->
     <!-- Bootstrap -->
 
     <link href="css/bootstrap.min.css" rel="stylesheet" media="all">
-    <link href="css/scaffolding.css?revision=335c5f0" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=030caf1" rel="stylesheet" media="all">
     <link href="css/modal.css" rel="stylesheet" media="all">
     <link href="css/spinner.css" rel="stylesheet" media="all">
     <link rel="alternate" href="/api/static.lua"/>
@@ -79,9 +79,9 @@ the License. -->
     <script src="js/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="></script>
     <!-- Include all compiled plugins (below), or include individual files as needed -->
     <script src="js/bootstrap.min.js"></script>
-    <script src="js/config.js?revision=335c5f0"></script>
-    <script src="js/wordcloud.js?revision=335c5f0"></script>
-    <script src="js/ponymail.js?revision=335c5f0"></script>
+    <script src="js/config.js?revision=030caf1"></script>
+    <script src="js/wordcloud.js?revision=030caf1"></script>
+    <script src="js/ponymail.js?revision=030caf1"></script>
     <div id="splash" class="splash fade-in"> &nbsp; </div>
     <div style="clear: both;"></div>
   </body>
diff --git a/webui/index.html b/webui/index.html
index aa16875..65a30f8 100644
--- a/webui/index.html
+++ b/webui/index.html
@@ -24,7 +24,7 @@ the License. -->
     <!-- Bootstrap -->
     
     <link href="css/bootstrap.min.css" rel="stylesheet" media="all">
-    <link href="css/scaffolding.css?revision=335c5f0" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=030caf1" rel="stylesheet" media="all">
     <link href="css/modal.css" rel="stylesheet" media="all">
     <link href="css/spinner.css" rel="stylesheet" media="all">
     <link rel="alternate" href="/api/static.lua"/>
@@ -63,8 +63,8 @@ the License. -->
     <script src="js/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="></script>
     <!-- Include all compiled plugins (below), or include individual files as needed -->
     <script src="js/bootstrap.min.js"></script>
-    <script src="js/config.js?revision=335c5f0"></script>
-    <script src="js/ponymail.js?revision=335c5f0"></script>
+    <script src="js/config.js?revision=030caf1"></script>
+    <script src="js/ponymail.js?revision=030caf1"></script>
     <div id="splash" class="splash fade-in"> &nbsp; </div>
     <div style="clear: both;"></div>
     
diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index 00eec6d..61eb755 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -16,7 +16,7 @@
 */
 // THIS IS AN AUTOMATICALLY COMBINED FILE. PLEASE EDIT THE source/ FILES!
 
-const PONYMAIL_REVISION = '335c5f0';
+const PONYMAIL_REVISION = '030caf1';
 
 
 /******************************************
@@ -978,7 +978,6 @@ function construct_single_thread(state, json) {
     div.innerHTML = "";
 
     // Fix URLs if they point to an deprecated permalink
-    let looked_for_parent = location.href.match(/find_parent/) ? true : false;
     if (json.thread) {
         let url_to_push = location.href.replace(/[^/]+$/, "") + json.thread.id;
         if (location.href != url_to_push) {
@@ -988,10 +987,11 @@ function construct_single_thread(state, json) {
     }
 
     // Not top level thread?
+    let looked_for_parent = location.query == 'find_parent=true';
     if (!looked_for_parent && json.thread['in-reply-to'] && json.thread['in-reply-to'].length > 0) {
         let isign = new HTML('span', {class: 'glyphicon glyphicon-eye-close'}, " ");
         let btitle = new HTML("b", {}, "This may not be the start of the conversation...");
-        let a = new HTML("a", {href: "javascript:void(location.href += '&find_parent=true');"}, "Find parent email");
+        let a = new HTML("a", {href: "javascript:void(location.href += '?find_parent=true');"}, "Find parent email");
         let notice = new HTML("div", {class: "infobox"}, [
             isign,
             btitle,
@@ -3581,7 +3581,7 @@ function parseURL(state) {
 
 
 // Parse a permalink and fetch the thread
-// URL is expected to be of the form /thread[.html]/<msgid>?<list.id>
+// URL is expected to be of the form /thread[.html]/<msgid>?<list.id>|find_parent=true
 // onload function for thread.html
 function parse_permalink() {
     // message id is the bit after the last /
@@ -3591,10 +3591,12 @@ function parse_permalink() {
     // query needs decodeURIComponent with '+' conversion
     const query = decodeURIComponent(location.search.substring(1).replace(/\+/g, ' '));
     let list_id = null;
+    let find_parent = false;
     if (query.length) {
         if (query.match(/^<.+>$/)) {
             list_id = query;
         }
+        find_parent = query == 'find_parent=true';
     }
 
     mid = unshortenID(mid);  // In case of old school shortened links
@@ -3608,13 +3610,15 @@ function parse_permalink() {
     }
     else {
         let encoded_mid = encodeURIComponent(mid);
-        // If looking for parent, don't encode this bit of the arg string.
-        if (mid.match(/&find_parent=true/)) {
-            encoded_mid = encodeURIComponent(mid.replace(/&find_parent=true/, '')) + '&find_parent=true';
+        if (find_parent) {
+            GET('%sapi/thread.lua?id=%s&find_parent=true'.format(G_apiURL, encoded_mid), construct_single_thread, {
+                cached: true
+            });
+        } else {
+            GET('%sapi/thread.lua?id=%s'.format(G_apiURL, encoded_mid), construct_single_thread, {
+                cached: true
+            });
         }
-        GET('%sapi/thread.lua?id=%s'.format(G_apiURL, encoded_mid), construct_single_thread, {
-            cached: true
-        });
     }
 }
 
diff --git a/webui/list.html b/webui/list.html
index fd616f5..42e3d21 100644
--- a/webui/list.html
+++ b/webui/list.html
@@ -24,7 +24,7 @@ the License. -->
     <!-- Bootstrap -->
     
     <link href="css/bootstrap.min.css" rel="stylesheet" media="all">
-    <link href="css/scaffolding.css?revision=335c5f0" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=030caf1" rel="stylesheet" media="all">
     <link href="css/modal.css" rel="stylesheet" media="all">
     <link href="css/spinner.css" rel="stylesheet" media="all">
     <link rel="alternate" href="/api/static.lua"/>
@@ -181,9 +181,9 @@ the License. -->
     </script>
     <!-- Include all compiled plugins (below), or include individual files as needed -->
     <script src="js/bootstrap.min.js"></script>
-    <script src="js/config.js?revision=335c5f0"></script>
-    <script src="js/wordcloud.js?revision=335c5f0"></script>
-    <script src="js/ponymail.js?revision=335c5f0"></script>
+    <script src="js/config.js?revision=030caf1"></script>
+    <script src="js/wordcloud.js?revision=030caf1"></script>
+    <script src="js/ponymail.js?revision=030caf1"></script>
     <div id="splash" class="splash fade-in"> &nbsp; </div>
     <div style="clear: both;"></div>
     <script type="text/javascript">
diff --git a/webui/oauth.html b/webui/oauth.html
index 321b14b..d6fabff 100644
--- a/webui/oauth.html
+++ b/webui/oauth.html
@@ -21,7 +21,7 @@ the License. -->
 
     <!-- CSS -->
     <link href="css/bootstrap.min.css" rel="stylesheet" media="all">
-    <link href="css/scaffolding.css?revision=335c5f0" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=030caf1" rel="stylesheet" media="all">
     <link href="css/modal.css" rel="stylesheet" media="all">
     <link href="css/spinner.css" rel="stylesheet" media="all">
 
@@ -54,8 +54,8 @@ the License. -->
     <script src="js/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="></script>
     <!-- Include all compiled plugins (below), or include individual files as needed -->
     <script src="js/bootstrap.min.js"></script>
-    <script src="js/config.js?revision=335c5f0"></script>
-    <script src="js/ponymail.js?revision=335c5f0"></script>
-    <script src="js/oauth.js?revision=335c5f0"></script>
+    <script src="js/config.js?revision=030caf1"></script>
+    <script src="js/ponymail.js?revision=030caf1"></script>
+    <script src="js/oauth.js?revision=030caf1"></script>
   </body>
 </html>
diff --git a/webui/thread.html b/webui/thread.html
index ab52268..239e5be 100644
--- a/webui/thread.html
+++ b/webui/thread.html
@@ -25,7 +25,7 @@ the License. -->
     <!-- Bootstrap -->
     
     <link href="css/bootstrap.min.css" rel="stylesheet" media="all">
-    <link href="css/scaffolding.css?revision=335c5f0" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=030caf1" rel="stylesheet" media="all">
     <link href="css/modal.css" rel="stylesheet" media="all">
     <link href="css/spinner.css" rel="stylesheet" media="all">
     <link rel="alternate" href="/api/static.lua"/>
@@ -97,9 +97,9 @@ the License. -->
     <script src="js/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="></script>
     <!-- Include all compiled plugins (below), or include individual files as needed -->
     <script src="js/bootstrap.min.js"></script>
-    <script src="js/config.js?revision=335c5f0"></script>
-    <script src="js/wordcloud.js?revision=335c5f0"></script>
-    <script src="js/ponymail.js?revision=335c5f0"></script>
+    <script src="js/config.js?revision=030caf1"></script>
+    <script src="js/wordcloud.js?revision=030caf1"></script>
+    <script src="js/ponymail.js?revision=030caf1"></script>
     <div id="splash" class="splash fade-in"> &nbsp; </div>
     <div style="clear: both;"></div>
   </body>

[incubator-ponymail-foal] 01/02: Find parent link does not work

Posted by se...@apache.org.
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

commit 030caf1f23b73d432b68ff53c23815a65d04e6b8
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jan 26 00:03:36 2022 +0000

     Find parent link does not work
    
     This fixes #214
---
 webui/js/source/construct-thread.js |  4 ++--
 webui/js/source/primer.js           | 18 +++++++++++-------
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/webui/js/source/construct-thread.js b/webui/js/source/construct-thread.js
index 3a5d716..6537e54 100644
--- a/webui/js/source/construct-thread.js
+++ b/webui/js/source/construct-thread.js
@@ -125,7 +125,6 @@ function construct_single_thread(state, json) {
     div.innerHTML = "";
 
     // Fix URLs if they point to an deprecated permalink
-    let looked_for_parent = location.href.match(/find_parent/) ? true : false;
     if (json.thread) {
         let url_to_push = location.href.replace(/[^/]+$/, "") + json.thread.id;
         if (location.href != url_to_push) {
@@ -135,10 +134,11 @@ function construct_single_thread(state, json) {
     }
 
     // Not top level thread?
+    let looked_for_parent = location.query == 'find_parent=true';
     if (!looked_for_parent && json.thread['in-reply-to'] && json.thread['in-reply-to'].length > 0) {
         let isign = new HTML('span', {class: 'glyphicon glyphicon-eye-close'}, " ");
         let btitle = new HTML("b", {}, "This may not be the start of the conversation...");
-        let a = new HTML("a", {href: "javascript:void(location.href += '&find_parent=true');"}, "Find parent email");
+        let a = new HTML("a", {href: "javascript:void(location.href += '?find_parent=true');"}, "Find parent email");
         let notice = new HTML("div", {class: "infobox"}, [
             isign,
             btitle,
diff --git a/webui/js/source/primer.js b/webui/js/source/primer.js
index 2ea3fb2..723f65c 100644
--- a/webui/js/source/primer.js
+++ b/webui/js/source/primer.js
@@ -146,7 +146,7 @@ function parseURL(state) {
 
 
 // Parse a permalink and fetch the thread
-// URL is expected to be of the form /thread[.html]/<msgid>?<list.id>
+// URL is expected to be of the form /thread[.html]/<msgid>?<list.id>|find_parent=true
 // onload function for thread.html
 function parse_permalink() {
     // message id is the bit after the last /
@@ -156,10 +156,12 @@ function parse_permalink() {
     // query needs decodeURIComponent with '+' conversion
     const query = decodeURIComponent(location.search.substring(1).replace(/\+/g, ' '));
     let list_id = null;
+    let find_parent = false;
     if (query.length) {
         if (query.match(/^<.+>$/)) {
             list_id = query;
         }
+        find_parent = query == 'find_parent=true';
     }
 
     mid = unshortenID(mid);  // In case of old school shortened links
@@ -173,13 +175,15 @@ function parse_permalink() {
     }
     else {
         let encoded_mid = encodeURIComponent(mid);
-        // If looking for parent, don't encode this bit of the arg string.
-        if (mid.match(/&find_parent=true/)) {
-            encoded_mid = encodeURIComponent(mid.replace(/&find_parent=true/, '')) + '&find_parent=true';
+        if (find_parent) {
+            GET('%sapi/thread.lua?id=%s&find_parent=true'.format(G_apiURL, encoded_mid), construct_single_thread, {
+                cached: true
+            });
+        } else {
+            GET('%sapi/thread.lua?id=%s'.format(G_apiURL, encoded_mid), construct_single_thread, {
+                cached: true
+            });
         }
-        GET('%sapi/thread.lua?id=%s'.format(G_apiURL, encoded_mid), construct_single_thread, {
-            cached: true
-        });
     }
 }