[open-ils-commits] r10384 - trunk/Open-ILS/web/opac/common/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Aug 20 21:56:31 EDT 2008
Author: dbs
Date: 2008-08-20 21:56:29 -0400 (Wed, 20 Aug 2008)
New Revision: 10384
Modified:
trunk/Open-ILS/web/opac/common/js/RemoteRequest.js
Log:
Make RemoteRequest.js work inside the staff client as well as the OPAC
Modified: trunk/Open-ILS/web/opac/common/js/RemoteRequest.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/RemoteRequest.js 2008-08-20 17:14:34 UTC (rev 10383)
+++ trunk/Open-ILS/web/opac/common/js/RemoteRequest.js 2008-08-21 01:56:29 UTC (rev 10384)
@@ -59,9 +59,14 @@
var rrId = 0;
function RemoteRequest( service, method ) {
-
+ /* dojo is currently only available in the OPAC */
+ try {
+ this.locale = dojo.config.locale;
+ }
+ catch (e) {
+ this.locale = null;
+ }
this.service = service;
- this.locale = dojo.config.locale;
this.method = method;
this.xmlhttp = false;
this.name = null;
@@ -85,7 +90,11 @@
}
if(!this.params) { this.params = ""; }
- this.param_string = "service=" + service + "&locale=" + locale + "&method=" + method + this.params;
+
+ this.param_string = "service=" + service + "&method=" + method + this.params;
+ if (this.locale != null) {
+ this.param_string = this.param_string + "&locale=" + this.locale;
+ }
if( this.buildXMLRequest() == null ) alert("Browser is not supported!");
}
More information about the open-ils-commits
mailing list