[Mapbender-commits] r5275 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jan 5 11:54:06 EST 2010


Author: christoph
Date: 2010-01-05 11:54:06 -0500 (Tue, 05 Jan 2010)
New Revision: 5275

Modified:
   trunk/mapbender/http/javascripts/map.php
Log:
added options.$target

Modified: trunk/mapbender/http/javascripts/map.php
===================================================================
--- trunk/mapbender/http/javascripts/map.php	2010-01-05 16:53:10 UTC (rev 5274)
+++ trunk/mapbender/http/javascripts/map.php	2010-01-05 16:54:06 UTC (rev 5275)
@@ -218,6 +218,9 @@
 		"}";
 
 	echo "Mapbender.modules." . $e_id . " = " . $elementAttributes . ";\n";
+	echo "var t = Mapbender.modules." . $e_id . ".target;";
+	echo "var sel = [];for (var k in t) {sel.push('#' + t[k])}\n";
+	echo "Mapbender.modules." . $e_id . ".\$target = \$(sel.join(', '));\n";
 
 	//
 	// Include JavaScript files
@@ -229,7 +232,7 @@
 			// Create the jQuery plugin in output buffer
 			//
 			ob_start();
-			echo "var options = " . $elementAttributes . ";\n";
+			echo "var options = Mapbender.modules." . $e_id . ";\n";
 			
 			// extend the options variable by JS element vars 
 			include "../include/dyn_js_object.php";



More information about the Mapbender_commits mailing list