move global_util.js to chrome
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Aug 2006 19:43:19 +0000 (19:43 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Aug 2006 19:43:19 +0000 (19:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5762 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/Makefile
Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js [new file with mode: 0644]
Open-ILS/xul/staff_client/server/OpenILS/global_util.js [deleted file]

index 7570693..e9c7170 100644 (file)
@@ -48,7 +48,7 @@ build_dir:
        cp build/chrome/content/main/lang.js build/server/main/lang.js
        cp build/chrome/content/main/simple_auth.xul build/server/main/simple_auth.xul
        cp build/chrome/content/OpenILS/data.js build/server/OpenILS/data.js
-       cp build/server/OpenILS/global_util.js build/chrome/content/OpenILS/global_util.js
+       cp build/chrome/content/OpenILS/global_util.js build/server/OpenILS/global_util.js
        external/prune_dirs.sh build/
 
 stamp: 
diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
new file mode 100644 (file)
index 0000000..79bdc6a
--- /dev/null
@@ -0,0 +1,68 @@
+       function ses(a) {
+               JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
+               switch(a) {
+                       case 'authtime' :
+                               return data.session.authtime;
+                       break;
+                       case 'key':
+                       default:
+                               return data.session.key;
+                       break;
+               }
+       }
+
+       function font_helper() {
+               try {
+                       JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
+                       removeCSSClass(document.documentElement,'ALL_FONTS_LARGER');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_SMALLER');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_XX_SMALL');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_X_SMALL');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_SMALL');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_MEDIUM');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_LARGE');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_X_LARGE');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_XX_LARGE');
+                       addCSSClass(document.documentElement,data.global_font_adjust);
+               } catch(E) {
+                       alert("Error with adjusting the font size: " + E);
+               }
+       }
+
+       function get_bool(a) {
+               // Normal javascript interpretation except 'f' == false, per postgres, and 'F' == false
+               // So false includes 'f', '', 0, null, and undefined
+               if (a == 'f') return false;
+               if (a == 'F') return false;
+               if (a) return true; else return false;
+       }
+
+       function get_db_true() {
+               return 't';
+       }
+
+       function get_db_false() {
+               return 'f';
+       }
+
+       function copy_to_clipboard(ev) {
+               try {
+                       netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+                       var text;
+                       if (typeof ev == 'object') {
+                               if (typeof ev.target != 'undefined') {
+                                       if (typeof ev.target.textContent != 'undefined') if (ev.target.textContent) text = ev.target.textContent;
+                                       if (typeof ev.target.value != 'undefined') if (ev.target.value) text = ev.target.value;
+                               }
+                       } else if (typeof ev == 'string') {
+                               text = ev;
+                       }
+                       const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
+                               .getService(Components.interfaces.nsIClipboardHelper);
+                       gClipboardHelper.copyString(text);
+                       alert('Copied "'+text+'" to clipboard.');
+               } catch(E) {
+                       alert('Clipboard action failed: ' + E); 
+               }
+       }
+
diff --git a/Open-ILS/xul/staff_client/server/OpenILS/global_util.js b/Open-ILS/xul/staff_client/server/OpenILS/global_util.js
deleted file mode 100644 (file)
index 79bdc6a..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-       function ses(a) {
-               JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
-               switch(a) {
-                       case 'authtime' :
-                               return data.session.authtime;
-                       break;
-                       case 'key':
-                       default:
-                               return data.session.key;
-                       break;
-               }
-       }
-
-       function font_helper() {
-               try {
-                       JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
-                       removeCSSClass(document.documentElement,'ALL_FONTS_LARGER');
-                       removeCSSClass(document.documentElement,'ALL_FONTS_SMALLER');
-                       removeCSSClass(document.documentElement,'ALL_FONTS_XX_SMALL');
-                       removeCSSClass(document.documentElement,'ALL_FONTS_X_SMALL');
-                       removeCSSClass(document.documentElement,'ALL_FONTS_SMALL');
-                       removeCSSClass(document.documentElement,'ALL_FONTS_MEDIUM');
-                       removeCSSClass(document.documentElement,'ALL_FONTS_LARGE');
-                       removeCSSClass(document.documentElement,'ALL_FONTS_X_LARGE');
-                       removeCSSClass(document.documentElement,'ALL_FONTS_XX_LARGE');
-                       addCSSClass(document.documentElement,data.global_font_adjust);
-               } catch(E) {
-                       alert("Error with adjusting the font size: " + E);
-               }
-       }
-
-       function get_bool(a) {
-               // Normal javascript interpretation except 'f' == false, per postgres, and 'F' == false
-               // So false includes 'f', '', 0, null, and undefined
-               if (a == 'f') return false;
-               if (a == 'F') return false;
-               if (a) return true; else return false;
-       }
-
-       function get_db_true() {
-               return 't';
-       }
-
-       function get_db_false() {
-               return 'f';
-       }
-
-       function copy_to_clipboard(ev) {
-               try {
-                       netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
-                       var text;
-                       if (typeof ev == 'object') {
-                               if (typeof ev.target != 'undefined') {
-                                       if (typeof ev.target.textContent != 'undefined') if (ev.target.textContent) text = ev.target.textContent;
-                                       if (typeof ev.target.value != 'undefined') if (ev.target.value) text = ev.target.value;
-                               }
-                       } else if (typeof ev == 'string') {
-                               text = ev;
-                       }
-                       const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
-                               .getService(Components.interfaces.nsIClipboardHelper);
-                       gClipboardHelper.copyString(text);
-                       alert('Copied "'+text+'" to clipboard.');
-               } catch(E) {
-                       alert('Clipboard action failed: ' + E); 
-               }
-       }
-