Adjust javascript to account for using static paths instead of urls
authorKarl O. Pinc <kop@karlpinc.com>
Sat, 5 Oct 2024 00:20:27 +0000 (19:20 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sat, 5 Oct 2024 00:20:27 +0000 (19:20 -0500)
src/pgwui_sql/templates/sql.mak

index ae5020e4883794168eb72081365e1593e05aa60b..54c134ff837687961e7fb323011d2a8b6e4bec50 100644 (file)
            return '${request.route_path("pgwui_sql_edit")|n}';
   }
   function pgwuiSqlShowWhitespaceURL() {
-           return '${request.static_path(
+           return document.location.protocol + '//'
+                  + document.location.host
+                  + '${request.static_path(
                          "pgwui_sql:static/show_whitespace.css")}';
   }
   function pgwuiSqlBackgroundRulesURL() {
-           return '${request.static_path(
+           return document.location.protocol + '//'
+                  + document.location.host
+                  + '${request.static_path(
                          "pgwui_sql:static/background_rules.css")}';
   }
   // Set window name so that the sql_edit window can vary the target