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 2021/12/02 00:54:59 UTC

[incubator-ponymail-foal] branch master updated (2ba2966 -> f4f2b8a)

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 2ba2966  Regen and update links
     new 724e7ca  Simplify for loops
     new f4f2b8a  Regen

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                 | 31 +++++++++++++------------------
 webui/js/source/listview-threaded.js | 29 ++++++++++++-----------------
 webui/list.html                      |  8 ++++----
 webui/oauth.html                     |  8 ++++----
 webui/thread.html                    |  8 ++++----
 7 files changed, 44 insertions(+), 54 deletions(-)

[incubator-ponymail-foal] 02/02: Regen

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 f4f2b8ab80608c2b9dbceead7e69774f1db5cb6f
Author: Sebb <se...@apache.org>
AuthorDate: Thu Dec 2 00:54:48 2021 +0000

    Regen
---
 webui/admin.html     |  8 ++++----
 webui/index.html     |  6 +++---
 webui/js/ponymail.js | 31 +++++++++++++------------------
 webui/list.html      |  8 ++++----
 webui/oauth.html     |  8 ++++----
 webui/thread.html    |  8 ++++----
 6 files changed, 32 insertions(+), 37 deletions(-)

diff --git a/webui/admin.html b/webui/admin.html
index 225185c..7eb815f 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=ff56c7e" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=724e7ca" 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=ff56c7e"></script>
-    <script src="js/wordcloud.js?revision=ff56c7e"></script>
-    <script src="js/ponymail.js?revision=ff56c7e"></script>
+    <script src="js/config.js?revision=724e7ca"></script>
+    <script src="js/wordcloud.js?revision=724e7ca"></script>
+    <script src="js/ponymail.js?revision=724e7ca"></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 45a4492..e302dd9 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=ff56c7e" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=724e7ca" 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"/>
@@ -60,8 +60,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=ff56c7e"></script>
-    <script src="js/ponymail.js?revision=ff56c7e"></script>
+    <script src="js/config.js?revision=724e7ca"></script>
+    <script src="js/ponymail.js?revision=724e7ca"></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 9af1896..79c68e0 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 = 'ff56c7e';
+const PONYMAIL_REVISION = '724e7ca';
 
 
 /******************************************
@@ -2555,12 +2555,11 @@ window.addEventListener('orientationchange', function() {
 ******************************************/
 
 function calc_email_width() {
-    // Figure out how many emails per page
+    // Get email width; used for calculating reply nesting offsets
     let body = document.body;
     let html = document.documentElement;
-    let width = Math.max(body.scrollWidth, body.offsetWidth,
+    return Math.max(body.scrollWidth, body.offsetWidth,
         html.clientWidth, html.scrollWidth, html.offsetWidth);
-    return width;
 }
 
 function listview_threaded(json, start) {
@@ -2589,8 +2588,8 @@ function listview_threaded(json, start) {
 
 function find_email(id) {
     let json = G_current_json;
-    for (let i = 0; i < json.emails.length; i++) {
-        if (json.emails[i].id == id) return json.emails[i];
+    for (let email of json.emails) {
+        if (email.id == id) return email;
     }
     return null;
 }
@@ -2598,12 +2597,10 @@ function find_email(id) {
 function count_replies(thread) {
     let reps = 0;
     if (isArray(thread.children)) {
-        for (let i = 0; i < thread.children.length; i++) {
-            if (thread.children[i].tid == thread.tid) reps--;
-            if (true) {
-                reps++;
-                reps += count_replies(thread.children[i]);
-            }
+        for (let child of thread.children) {
+            if (child.tid == thread.tid) reps--;
+            reps++;
+            reps += count_replies(thread.children[i]);
         }
     }
     return reps;
@@ -2614,10 +2611,8 @@ function count_people(thread, hash) {
     let eml = find_email(thread.tid);
     if (eml) ppl[eml.from] = true;
     if (isArray(thread.children)) {
-        for (let i = 0; i < thread.children.length; i++) {
-            if (true) {
-                count_people(thread.children[i], ppl);
-            }
+        for (let child of thread.children) {
+            count_people(child, ppl);
         }
     }
     let n = 0;
@@ -2629,8 +2624,8 @@ function count_people(thread, hash) {
 function last_email(thread) {
     let newest = thread.epoch;
     if (isArray(thread.children)) {
-        for (let i = 0; i < thread.children.length; i++) {
-            newest = Math.max(newest, last_email(thread.children[i]));
+        for (let child of thread.children) {
+            newest = Math.max(newest, last_email(child));
         }
     }
     return newest;
diff --git a/webui/list.html b/webui/list.html
index 6de1985..4168d10 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=ff56c7e" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=724e7ca" 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"/>
@@ -173,9 +173,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=ff56c7e"></script>
-    <script src="js/wordcloud.js?revision=ff56c7e"></script>
-    <script src="js/ponymail.js?revision=ff56c7e"></script>
+    <script src="js/config.js?revision=724e7ca"></script>
+    <script src="js/wordcloud.js?revision=724e7ca"></script>
+    <script src="js/ponymail.js?revision=724e7ca"></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 57978e1..07704ad 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=ff56c7e" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=724e7ca" 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=ff56c7e"></script>
-    <script src="js/ponymail.js?revision=ff56c7e"></script>
-    <script src="js/oauth.js?revision=ff56c7e"></script>
+    <script src="js/config.js?revision=724e7ca"></script>
+    <script src="js/ponymail.js?revision=724e7ca"></script>
+    <script src="js/oauth.js?revision=724e7ca"></script>
   </body>
 </html>
diff --git a/webui/thread.html b/webui/thread.html
index cbddf95..4c56a88 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=ff56c7e" rel="stylesheet" media="all">
+    <link href="css/scaffolding.css?revision=724e7ca" 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=ff56c7e"></script>
-    <script src="js/wordcloud.js?revision=ff56c7e"></script>
-    <script src="js/ponymail.js?revision=ff56c7e"></script>
+    <script src="js/config.js?revision=724e7ca"></script>
+    <script src="js/wordcloud.js?revision=724e7ca"></script>
+    <script src="js/ponymail.js?revision=724e7ca"></script>
     <div id="splash" class="splash fade-in"> &nbsp; </div>
     <div style="clear: both;"></div>
   </body>

[incubator-ponymail-foal] 01/02: Simplify for loops

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 724e7cacb206eb3fad9493814ea9f42df5c53cf9
Author: Sebb <se...@apache.org>
AuthorDate: Thu Dec 2 00:53:58 2021 +0000

    Simplify for loops
---
 webui/js/source/listview-threaded.js | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/webui/js/source/listview-threaded.js b/webui/js/source/listview-threaded.js
index 629dfed..3ee2a0d 100644
--- a/webui/js/source/listview-threaded.js
+++ b/webui/js/source/listview-threaded.js
@@ -16,12 +16,11 @@
  */
 
 function calc_email_width() {
-    // Figure out how many emails per page
+    // Get email width; used for calculating reply nesting offsets
     let body = document.body;
     let html = document.documentElement;
-    let width = Math.max(body.scrollWidth, body.offsetWidth,
+    return Math.max(body.scrollWidth, body.offsetWidth,
         html.clientWidth, html.scrollWidth, html.offsetWidth);
-    return width;
 }
 
 function listview_threaded(json, start) {
@@ -50,8 +49,8 @@ function listview_threaded(json, start) {
 
 function find_email(id) {
     let json = G_current_json;
-    for (let i = 0; i < json.emails.length; i++) {
-        if (json.emails[i].id == id) return json.emails[i];
+    for (let email of json.emails) {
+        if (email.id == id) return email;
     }
     return null;
 }
@@ -59,12 +58,10 @@ function find_email(id) {
 function count_replies(thread) {
     let reps = 0;
     if (isArray(thread.children)) {
-        for (let i = 0; i < thread.children.length; i++) {
-            if (thread.children[i].tid == thread.tid) reps--;
-            if (true) {
-                reps++;
-                reps += count_replies(thread.children[i]);
-            }
+        for (let child of thread.children) {
+            if (child.tid == thread.tid) reps--;
+            reps++;
+            reps += count_replies(thread.children[i]);
         }
     }
     return reps;
@@ -75,10 +72,8 @@ function count_people(thread, hash) {
     let eml = find_email(thread.tid);
     if (eml) ppl[eml.from] = true;
     if (isArray(thread.children)) {
-        for (let i = 0; i < thread.children.length; i++) {
-            if (true) {
-                count_people(thread.children[i], ppl);
-            }
+        for (let child of thread.children) {
+            count_people(child, ppl);
         }
     }
     let n = 0;
@@ -90,8 +85,8 @@ function count_people(thread, hash) {
 function last_email(thread) {
     let newest = thread.epoch;
     if (isArray(thread.children)) {
-        for (let i = 0; i < thread.children.length; i++) {
-            newest = Math.max(newest, last_email(thread.children[i]));
+        for (let child of thread.children) {
+            newest = Math.max(newest, last_email(child));
         }
     }
     return newest;