Look for and evaluate /xul/server/skin/custom.js if it exists. Mainly for overriding...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Apr 2010 16:48:44 +0000 (16:48 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Apr 2010 16:48:44 +0000 (16:48 +0000)
We'll do this with all remote interfaces (via util_overlay.xul) and with the main chrome menu/window and the chrome opac browser

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16275 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/cat/opac.js
Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul

index 5007119..865b0db 100644 (file)
@@ -19,6 +19,15 @@ function my_init() {
         JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
         XML_HTTP_SERVER = g.data.server_unadorned;
 
+        // Pull in local customizations
+        var r = new XMLHttpRequest();
+        r.open("GET", xulG.url_prefix('/xul/server/skin/custom.js'), false);
+        r.send(null);
+        if (r.status == 200) {
+            dump('Evaluating /xul/server/skin/custom.js\n');
+            eval( r.responseText );
+        }
+
         JSAN.use('util.network'); g.network = new util.network();
 
         g.cgi = new CGI();
index aea955e..e629ae7 100644 (file)
@@ -50,6 +50,15 @@ main.menu.prototype = {
 
         urls.remote = params['server'];
 
+        // Pull in local customizations
+        var r = new XMLHttpRequest();
+        r.open("GET", url_prefix('/xul/server/skin/custom.js'), false);
+        r.send(null);
+        if (r.status == 200) {
+            dump('Evaluating /xul/server/skin/custom.js\n');
+            eval( r.responseText );
+        }
+
         var obj = this;
 
         JSAN.use('OpenILS.data'); obj.data = new OpenILS.data(); obj.data.init({'via':'stash'});
index 2048b90..eb38d43 100644 (file)
@@ -13,6 +13,7 @@
         <script>try { dojo.require('dojo.date.locale'); } catch(E) { alert(E); }</script>
         <script>try { dojo.require('dojo.date.stamp'); } catch(E) { alert(E); }</script>
         <script type="text/javascript" src="/xul/server/main/constants.js" />
+        <script type="text/javascript" src="/xul/server/skin/custom.js" />
         <script type="text/javascript" src="/xul/server/OpenILS/data.js" />
         <script type="text/javascript" src="/xul/server/util/barcode.js" />
         <script type="text/javascript" src="/xul/server/util/browser.js" />