From 855417e7380636447e305fb7c43e94c8c339e955 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 21 Jun 2010 17:22:41 -0400 Subject: [PATCH] Allow passing a jsuri parameter to specify where to find the hordemap js files --- horde/js/hordemap/map.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/horde/js/hordemap/map.js b/horde/js/hordemap/map.js index 65f650358..5b33ad9a8 100644 --- a/horde/js/hordemap/map.js +++ b/horde/js/hordemap/map.js @@ -23,9 +23,10 @@ HordeMap = { * Initialize hordemap javascript * * @param object opts Hash containing: - * 'driver': HordeMap driver to use (Horde | SAPO) - * 'geocoder': Geocoder driver to use - * 'providers': default provider layers to add (Google, Yahoo etc...) + * 'driver': HordeMap driver to use (Horde | SAPO) + * 'geocoder': Geocoder driver to use + * 'providers': Default provider layers to add (Google, Yahoo etc...) + * 'jsuri': The uri to the hordemap directory * * 'conf': Any driver specific config settings such as: * 'language': @@ -39,8 +40,13 @@ HordeMap = { */ initialize: function(opts) { + var path; this._opts = opts; - var path = this._getScriptLocation(); + if(!opts.jsuri) { + path = this._getScriptLocation(); + } else { + path = opts.jsuri; + } this.conf = this._opts.conf; if (this._opts.driver == 'Horde') { this._addScript(path + 'OpenLayers.js'); -- 2.11.0