[Opensrf-commits] r1301 - trunk/src/javascript

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Apr 9 14:18:57 EDT 2008


Author: miker
Date: 2008-04-09 13:41:39 -0400 (Wed, 09 Apr 2008)
New Revision: 1301

Added:
   trunk/src/javascript/OpenSRF.js
Log:
dojo wrapper to opensrf JS libs

Added: trunk/src/javascript/OpenSRF.js
===================================================================
--- trunk/src/javascript/OpenSRF.js	                        (rev 0)
+++ trunk/src/javascript/OpenSRF.js	2008-04-09 17:41:39 UTC (rev 1301)
@@ -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];
+	}
+}



More information about the opensrf-commits mailing list