From e721f89d7b1deb020a56a6591ee351364cae7592 Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 21 Aug 2008 01:56:29 +0000 Subject: [PATCH] Make RemoteRequest.js work inside the staff client as well as the OPAC git-svn-id: svn://svn.open-ils.org/ILS/trunk@10384 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/common/js/RemoteRequest.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/opac/common/js/RemoteRequest.js b/Open-ILS/web/opac/common/js/RemoteRequest.js index a9ef9cc88f..53d183062d 100644 --- a/Open-ILS/web/opac/common/js/RemoteRequest.js +++ b/Open-ILS/web/opac/common/js/RemoteRequest.js @@ -59,9 +59,14 @@ function destroyRequest(r) { 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 @@ function RemoteRequest( service, method ) { } 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!"); } -- 2.43.2