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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Nov 3 11:22:36 EST 2009


Author: christoph
Date: 2009-11-03 11:22:35 -0500 (Tue, 03 Nov 2009)
New Revision: 4912

Modified:
   trunk/mapbender/http/javascripts/map.php
Log:
added ui core

added currentTitle

added exception for plugin folder 

Modified: trunk/mapbender/http/javascripts/map.php
===================================================================
--- trunk/mapbender/http/javascripts/map.php	2009-11-03 16:20:38 UTC (rev 4911)
+++ trunk/mapbender/http/javascripts/map.php	2009-11-03 16:22:35 UTC (rev 4912)
@@ -77,7 +77,8 @@
 $extPath = dirname(__FILE__) . "/../extensions/";
 $extFileArray = array(  "jquery-1.3.2.min.js", 
 						"jqjson.js", 
-						"jquery.form.js"
+						"jquery.form.js",
+						"jquery-ui-1.7.2.custom/development-bundle/ui/ui.core.js"
 						);
 
 for ($i = 0; $i < count($extFileArray); $i++) {
@@ -180,14 +181,15 @@
 <?php
 $executeJsPluginsArray = array();
 
-$mb_sql = "SELECT DISTINCT e_js_file, e_id, e_src, e_target, e_pos, " .
-		"e_url, e_left, e_top, e_width, e_height, e_requires FROM gui_element WHERE e_public = 1 AND " .
-		"fkey_gui_id = $1 ORDER BY e_pos";
+$mb_sql = "SELECT DISTINCT e_js_file, e_id, e_src, e_target, e_pos, e_url, " . 
+	"e_left, e_top, e_title, gettext($1, e_title) AS e_current_title, " . 
+	"e_width, e_height, e_requires FROM gui_element WHERE e_public = 1 AND " .
+	"fkey_gui_id = $1 ORDER BY e_pos";
 $mb_v = array($gui_id);
 $mb_t = array("s");
 $mb_res = db_prep_query($mb_sql, $mb_v, $mb_t);
 while ($row_js = db_fetch_array($mb_res)) {
-		
+
 	//
 	// Create element properties
 	//
@@ -195,6 +197,8 @@
 		str_replace(" ", "", $row_js["e_id"]) : "";
 	$e_src = $row_js["e_src"];
 	$e_require = $row_js["e_requires"];
+	$e_title = $row_js["e_title"];
+	$e_currentTitle = $row_js["e_current_title"];
 	$e_target = explode(",",$row_js["e_target"]);
 	$e_width = intval($row_js["e_width"]);
 	$e_height = intval($row_js["e_height"]);
@@ -209,7 +213,9 @@
 		"left:$e_left," . 
 		"width:$e_width," . 
 		"height:$e_height," . 
-		"src:'$e_src'" . 
+		"src:'$e_src'," . 
+		"title:'$e_title'," . 
+		"currentTitle:'$e_currentTitle'," . 
 		"}";
 
 	echo "Mapbender.modules." . $e_id . " = " . $elementAttributes . ";\n";
@@ -219,7 +225,7 @@
 	//
 	$jsFileString = $row_js["e_js_file"];
 	if ($jsFileString){
-		if (in_array($e_id, $modulesNotRelyingOnGlobalsArray)) {
+		if (in_array($e_id, $modulesNotRelyingOnGlobalsArray) || preg_match("/\/plugins\//", $jsFileString)) {
 			//
 			// Create the jQuery plugin in output buffer
 			//
@@ -271,4 +277,4 @@
 echo "\nfunction initModules () {\n";
 echo implode("\n", $executeJsPluginsArray);
 echo "}\n";
-?>
\ No newline at end of file
+?>



More information about the Mapbender_commits mailing list