dojo wrapper to opensrf JS libs
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 9 Apr 2008 17:41:39 +0000 (17:41 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 9 Apr 2008 17:41:39 +0000 (17:41 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1301 9efc2488-bf62-4759-914b-345cdb29e865

src/javascript/OpenSRF.js [new file with mode: 0644]

diff --git a/src/javascript/OpenSRF.js b/src/javascript/OpenSRF.js
new file mode 100644 (file)
index 0000000..38d69f1
--- /dev/null
@@ -0,0 +1,14 @@
+if(!dojo._hasResource['OpenSRF']){
+
+       dojo._hasResource['OpenSRF'] = true;
+       dojo.provide('OpenSRF');
+       dojo.require('opensrf.opensrf', true);
+       dojo.require('opensrf.opensrf_xhr', true);
+
+       OpenSRF.session_cache = {};
+       OpenSRF.CachedClientSession = function ( app ) {
+               if (this.session_cache[app]) return this.session_cache[app];
+               this.session_cache[app] = new OpenSRF.ClientSession ( app );
+               return this.session_cache[app];
+       }
+}