ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [incubator-ponymail] branch master updated: Bug: Javascript URLs must always use URL_BASE
Date Mon, 16 Jul 2018 17:59:27 GMT
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.git


The following commit(s) were added to refs/heads/master by this push:
     new ca020eb  Bug: Javascript URLs must always use URL_BASE
ca020eb is described below

commit ca020eb972a1e1b8bd336444b500fafb046277a3
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Jul 16 18:59:25 2018 +0100

    Bug: Javascript URLs must always use URL_BASE
    
    THis fixes #469
---
 CHANGELOG.md                             |  1 +
 site/js/dev/ponymail_pagebuilder.js      |  2 +-
 site/js/dev/ponymail_phonebook.js        |  2 +-
 site/js/dev/ponymail_search.js           |  4 ++--
 site/js/dev/ponymail_user_preferences.js |  6 +++---
 site/js/ponymail.js                      | 14 +++++++-------
 6 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f0fd58..7fa930a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## Changes in 0.11-SNAPSHOT
+- Bug: Javascript URLs must always use URL_BASE (#469)
 - Bug: setup.py uses ES library version to decide what features the database supports (#464)
 - Various tidyups suggested by Pylint
 - Bug: archiver.py can never detect content-type: flowed (#461)
diff --git a/site/js/dev/ponymail_pagebuilder.js b/site/js/dev/ponymail_pagebuilder.js
index 559e78a..fd50f53 100644
--- a/site/js/dev/ponymail_pagebuilder.js
+++ b/site/js/dev/ponymail_pagebuilder.js
@@ -466,7 +466,7 @@ function getListInfo(list, xdomain, nopush) {
         var li = document.createElement("li")
         var a = document.createElement("a")
         var t = document.createTextNode(dom)
-        a.setAttribute("href", "list.html?" + dom)
+        a.setAttribute("href", URL_BASE + "/list.html?" + dom)
         a.appendChild(t)
         li.appendChild(a)
         lc.appendChild(li)
diff --git a/site/js/dev/ponymail_phonebook.js b/site/js/dev/ponymail_phonebook.js
index 9fc8365..b9277be 100644
--- a/site/js/dev/ponymail_phonebook.js
+++ b/site/js/dev/ponymail_phonebook.js
@@ -42,7 +42,7 @@ function showDomains(l) {
         }
         var a = document.createElement("a")
         var t = document.createTextNode(dom + extend)
-        a.setAttribute("href", "list.html?" + dom)
+        a.setAttribute("href", URL_BASE + "/list.html?" + dom)
         a.appendChild(t)
         li.appendChild(a)
         ul.appendChild(li)
diff --git a/site/js/dev/ponymail_search.js b/site/js/dev/ponymail_search.js
index e435a02..3f7afa3 100644
--- a/site/js/dev/ponymail_search.js
+++ b/site/js/dev/ponymail_search.js
@@ -173,7 +173,7 @@ function searchAll(q, dspan, from, subject, where) {
 
 // Adds an opensearch engine to the browser
 function addSearchEngine() {
-    window.external.AddSearchProvider("/api/websearch.lua?" + gxdomain)
+    window.external.AddSearchProvider(URL_BASE + "/api/websearch.lua?" + gxdomain)
 }
 
 // for firefox (chrome doesn't seem to get it just yet): add an opensearch header element,
@@ -183,7 +183,7 @@ function addSearchBar() {
     var sl = document.createElement('link')
     sl.setAttribute("rel", "search")
     sl.setAttribute("type", "application/opensearchdescription+xml")
-    sl.setAttribute("href", "/api/websearch.lua?" + gxdomain)
+    sl.setAttribute("href", URL_BASE + "/api/websearch.lua?" + gxdomain)
     sl.setAttribute("title", "PonyMail: " + gxdomain + " mailing lists")
     h.appendChild(sl)
 }
diff --git a/site/js/dev/ponymail_user_preferences.js b/site/js/dev/ponymail_user_preferences.js
index 7d0e2f8..e54f390 100644
--- a/site/js/dev/ponymail_user_preferences.js
+++ b/site/js/dev/ponymail_user_preferences.js
@@ -190,7 +190,7 @@ function setupUser() {
     var li = document.createElement("li")
     var a = document.createElement("a")
     var t = document.createTextNode("Notifications")
-    a.setAttribute("href", "notifications.html")
+    a.setAttribute("href", URL_BASE + "/notifications.html")
     
     a.appendChild(t)
     if (login.notifications && login.notifications > 0) {
@@ -222,7 +222,7 @@ function setupUser() {
             sli.setAttribute("class", "pull-left")
             var st = document.createTextNode(l)
             var sa = document.createElement('a')
-            sa.setAttribute("href", "list.html?" + l)
+            sa.setAttribute("href", URL_BASE + "/list.html?" + l)
             sa.appendChild(st)
             sli.appendChild(sa)
             ul.appendChild(sli)
@@ -236,7 +236,7 @@ function setupUser() {
     var li = document.createElement("li")
     var a = document.createElement("a")
     var t = document.createTextNode("Manage email addresses")
-    a.setAttribute("href", "merge.html")
+    a.setAttribute("href", URL_BASE + "/merge.html")
     a.appendChild(t)
     
     li.appendChild(a)
diff --git a/site/js/ponymail.js b/site/js/ponymail.js
index 7fce8e2..b4f23a3 100644
--- a/site/js/ponymail.js
+++ b/site/js/ponymail.js
@@ -4111,7 +4111,7 @@ function getListInfo(list, xdomain, nopush) {
         var li = document.createElement("li")
         var a = document.createElement("a")
         var t = document.createTextNode(dom)
-        a.setAttribute("href", "list.html?" + dom)
+        a.setAttribute("href", URL_BASE + "/list.html?" + dom)
         a.appendChild(t)
         li.appendChild(a)
         lc.appendChild(li)
@@ -4250,7 +4250,7 @@ function showDomains(l) {
         }
         var a = document.createElement("a")
         var t = document.createTextNode(dom + extend)
-        a.setAttribute("href", "list.html?" + dom)
+        a.setAttribute("href", URL_BASE + "/list.html?" + dom)
         a.appendChild(t)
         li.appendChild(a)
         ul.appendChild(li)
@@ -4607,7 +4607,7 @@ function searchAll(q, dspan, from, subject, where) {
 
 // Adds an opensearch engine to the browser
 function addSearchEngine() {
-    window.external.AddSearchProvider("/api/websearch.lua?" + gxdomain)
+    window.external.AddSearchProvider(URL_BASE + "/api/websearch.lua?" + gxdomain)
 }
 
 // for firefox (chrome doesn't seem to get it just yet): add an opensearch header element,
@@ -4617,7 +4617,7 @@ function addSearchBar() {
     var sl = document.createElement('link')
     sl.setAttribute("rel", "search")
     sl.setAttribute("type", "application/opensearchdescription+xml")
-    sl.setAttribute("href", "/api/websearch.lua?" + gxdomain)
+    sl.setAttribute("href", URL_BASE + "/api/websearch.lua?" + gxdomain)
     sl.setAttribute("title", "PonyMail: " + gxdomain + " mailing lists")
     h.appendChild(sl)
 }
@@ -5294,7 +5294,7 @@ function setupUser() {
     var li = document.createElement("li")
     var a = document.createElement("a")
     var t = document.createTextNode("Notifications")
-    a.setAttribute("href", "notifications.html")
+    a.setAttribute("href", URL_BASE + "/notifications.html")
     
     a.appendChild(t)
     if (login.notifications && login.notifications > 0) {
@@ -5326,7 +5326,7 @@ function setupUser() {
             sli.setAttribute("class", "pull-left")
             var st = document.createTextNode(l)
             var sa = document.createElement('a')
-            sa.setAttribute("href", "list.html?" + l)
+            sa.setAttribute("href", URL_BASE + "/list.html?" + l)
             sa.appendChild(st)
             sli.appendChild(sa)
             ul.appendChild(sli)
@@ -5340,7 +5340,7 @@ function setupUser() {
     var li = document.createElement("li")
     var a = document.createElement("a")
     var t = document.createTextNode("Manage email addresses")
-    a.setAttribute("href", "merge.html")
+    a.setAttribute("href", URL_BASE + "/merge.html")
     a.appendChild(t)
     
     li.appendChild(a)


Mime
View raw message