From: miker Date: Wed, 9 Apr 2008 17:41:39 +0000 (+0000) Subject: dojo wrapper to opensrf JS libs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f4e7f88a00e1e2228e14afaf2b9f94ed45cb0648;p=working%2FOpenSRF.git dojo wrapper to opensrf JS libs git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1301 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/javascript/OpenSRF.js b/src/javascript/OpenSRF.js new file mode 100644 index 0000000..38d69f1 --- /dev/null +++ b/src/javascript/OpenSRF.js @@ -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]; + } +}