[open-ils-commits] r12215 - trunk/Open-ILS/web/js/dojo/openils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Feb 17 23:52:27 EST 2009
Author: erickson
Date: 2009-02-17 23:52:25 -0500 (Tue, 17 Feb 2009)
New Revision: 12215
Added:
trunk/Open-ILS/web/js/dojo/openils/XUL.js
Log:
initial dojo-ified xul glue
Added: trunk/Open-ILS/web/js/dojo/openils/XUL.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/XUL.js (rev 0)
+++ trunk/Open-ILS/web/js/dojo/openils/XUL.js 2009-02-18 04:52:25 UTC (rev 12215)
@@ -0,0 +1,25 @@
+if(!dojo._hasResource["openils.XUL"]) {
+
+ dojo.provide("openils.XUL");
+ dojo.declare('openils.XUL', null, {});
+
+ openils.XUL.isXUL = function() {
+ return window.IAMXUL;
+ }
+
+ openils.XUL.getStash = function() {
+ if(openils.XUL.isXUL()) {
+ try {
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ var CacheClass = new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
+ return new CacheClass().wrappedJSObject.OpenILS.prototype.data;
+ } catch(e) {
+ console.log("Error loading XUL stash: " + e);
+ }
+ }
+
+ return {};
+ };
+}
+
+
More information about the open-ils-commits
mailing list