[Commits] r314 - apps/opengeo/geoexplorer/trunk/lib

commits at geoext.org commits at geoext.org
Wed Apr 1 20:28:25 CEST 2009


Author: sbenthall
Date: 2009-04-01 20:28:25 +0200 (Wed, 01 Apr 2009)
New Revision: 314

Modified:
   apps/opengeo/geoexplorer/trunk/lib/Viewer.js
Log:
JSON from query string parameter 'q' is now used in Viewer configuration


Modified: apps/opengeo/geoexplorer/trunk/lib/Viewer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/Viewer.js	2009-04-01 17:17:36 UTC (rev 313)
+++ apps/opengeo/geoexplorer/trunk/lib/Viewer.js	2009-04-01 18:28:25 UTC (rev 314)
@@ -18,8 +18,11 @@
      * Constructor: Viewer
      */
     constructor: function(config) {
+
+        var query = Ext.urlDecode(document.location.search.substr(1));
+        var queryConfig = Ext.util.JSON.decode(query.q);
         
-        this.initialConfig = Ext.apply({}, config);
+        this.initialConfig = Ext.apply({}, queryConfig, config);
         Ext.apply(this, config);
 
         // add any custom application events



More information about the Commits mailing list