[Mapbender-commits] r6760 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 16 06:21:22 EDT 2010


Author: christoph
Date: 2010-08-16 10:21:22 +0000 (Mon, 16 Aug 2010)
New Revision: 6760

Modified:
   trunk/mapbender/http/php/mod_customTree.php
   trunk/mapbender/http/php/mod_customTree_server.php
   trunk/mapbender/http/php/mod_wfs_conf_client.php
Log:
replaced olf jQuery (UI) version with recent one

Modified: trunk/mapbender/http/php/mod_customTree.php
===================================================================
--- trunk/mapbender/http/php/mod_customTree.php	2010-08-11 15:52:58 UTC (rev 6759)
+++ trunk/mapbender/http/php/mod_customTree.php	2010-08-16 10:21:22 UTC (rev 6760)
@@ -39,8 +39,9 @@
 		<script type='text/javascript'>
 <?php
 
-	require_once(dirname(__FILE__) . "/../extensions/jquery-1.2.6.min.js");
-	require_once(dirname(__FILE__) . "/../extensions/jquery-ui-personalized-1.5.2.js");
+	require_once(dirname(__FILE__) . "/../extensions/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js");
+	require_once(dirname(__FILE__) . "/../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery-ui-1.8.1.custom.js");
+	//require_once(dirname(__FILE__) . "/../extensions/jquery-ui-personalized-1.5.2.js");
 	require_once(dirname(__FILE__) . "/../extensions/jquery.contextmenu.r2.js");
 	require_once(dirname(__FILE__) . "/../extensions/jqjson.js");
 	require_once(dirname(__FILE__) . "/../javascripts/popup.js");
@@ -57,7 +58,7 @@
 
 			var saveTreeOnUnloadOrChange = function (myTree) {
 				if (myTree.hasChanged) {
-					var saveChanges = confirm("You have changed the tree. All changes will be lost. Save changes?");
+					var saveChanges = confirm("<?php echo _mb("You have changed the tree. All changes will be lost. Save changes?");?>");
 
 					if (saveChanges) {
 						Save.updateDatabase(function () {
@@ -83,12 +84,15 @@
 			
 			var getApplications = function () {
 				var queryObj = {
-					command:"getApplications"
+					command:"getApplications",
+					"sessionName": parent.Mapbender.sessionName,
+					"sessionId": parent.Mapbender.sessionId
 				};				
 				$.post("../php/mod_customTree_server.php", {
 					queryObj:$.toJSON(queryObj)
 				}, function (json, status) {
-					var replyObj = eval('(' + json + ')');
+					var replyObj = typeof json == "string" ?
+						eval('(' + json + ')') : json;
 
 					$select = $("#applicationSelect");
 					$select.change(function () {
@@ -125,12 +129,15 @@
 						command:"update",
 						parameters:{
 							data: data
-						}
+						},
+						"sessionName": parent.Mapbender.sessionName,
+						"sessionId": parent.Mapbender.sessionId
 					};
 					$.post("mod_customTree_server.php", {
 						queryObj:$.toJSON(queryObj)	
 					}, function (json, status) {
-						var replyObj = eval('(' + json + ')');
+						var replyObj = typeof json == "string" ?
+							eval('(' + json + ')') : json;
 						alert(replyObj.success);
 						myTree.hasChanged = false;
 						callback();
@@ -150,14 +157,16 @@
 						return;
 					}
 					
-					var confirmDelete = confirm("You are about to delete your customized folder structure. Proceed?");
+					var confirmDelete = confirm("<?php echo _mb("You are about to delete your customized folder structure. Proceed?");?>");
 
 					if (confirmDelete) {
 						var queryObj = {
 							"command": "delete",
 							"parameters": {
 								"applicationId": applicationId
-							}
+							},
+							"sessionName": parent.Mapbender.sessionName,
+							"sessionId": parent.Mapbender.sessionId
 						};
 						
 						$.post("../php/mod_customTree_server.php", {
@@ -207,24 +216,29 @@
 		</script>
 	</head>
 	<body>
+	<div style="border:solid gray 1px;padding:5px;">
+		<h2><?php echo _mb("Konfigure tree");?></h2>
+		<p><b><?php echo _mb("Please select a gui which its tree should be configured.");?></b></p>
 		<select id='applicationSelect'>
 			<option>...</option>
 		</select>
 		<div id="controls"></div>
-		<hr>
+		<div style="border-top: solid gray 1px; border-bottom: solid gray 0px;">
 		<div class="contextMenu" id="folderMenu">
 			<ul>
-				<li id="addFolder"><img src="images/folder_add.png" /> Add </li>
-				<li id="deleteFolder"><img src="images/folder_delete.png" /> Delete</li>
-				<li id="editFolder"><img src="images/folder_edit.png" /> Edit</li>
+				<li id="addFolder"><?php echo _mb("Add");?></li>
+				<li id="deleteFolder"><?php echo _mb("Delete");?></li>
+				<li id="editFolder"><?php echo _mb("Edit");?></li>
 			</ul>
 		</div>
 		<div class="contextMenu" id="rootMenu">
 			<ul>
-				<li id="addFolder"><img src="images/folder_add.png" /> Add </li>
+				<li id="addFolder"><?php echo _mb("Add");?></li>
 			</ul>
 		</div>
 		<div id='myTree'></div>
 		<div id='wmsTree'></div>
+		</div>
+	</div>
 	</body>
 </html>

Modified: trunk/mapbender/http/php/mod_customTree_server.php
===================================================================
--- trunk/mapbender/http/php/mod_customTree_server.php	2010-08-11 15:52:58 UTC (rev 6759)
+++ trunk/mapbender/http/php/mod_customTree_server.php	2010-08-16 10:21:22 UTC (rev 6760)
@@ -1,5 +1,15 @@
 <?php
 require_once dirname(__FILE__) . "/../classes/class_json.php";
+
+$json = new Mapbender_JSON();
+$queryObj = $json->decode($_REQUEST['queryObj']);
+
+if ($queryObj->sessionName && $queryObj->sessionId) {
+	session_name($queryObj->sessionName);
+	session_id($queryObj->sessionId);
+	session_start();
+}
+
 require_once dirname(__FILE__) . "/../classes/class_user.php";
 require_once dirname(__FILE__) . "/../classes/class_administration.php";
 
@@ -15,14 +25,11 @@
 	echo $output;
 }
 
-$json = new Mapbender_JSON();
-$queryObj = $json->decode($_REQUEST['queryObj']);
 $resultObj = array();
 $data = array();
 $e = new mb_notice("command: " . $queryObj->command);
 
-$userId = Mapbender::session()->get("mb_user_id");
-$user = new User($userId);
+$user = new User();
 
 switch($queryObj->command){
 

Modified: trunk/mapbender/http/php/mod_wfs_conf_client.php
===================================================================
--- trunk/mapbender/http/php/mod_wfs_conf_client.php	2010-08-11 15:52:58 UTC (rev 6759)
+++ trunk/mapbender/http/php/mod_wfs_conf_client.php	2010-08-16 10:21:22 UTC (rev 6760)
@@ -78,8 +78,8 @@
 echo "var global_mb_log_js = '".LOG_JS."';";
 echo "var global_mb_log_level = '".LOG_LEVEL."';";
 echo "var global_log_levels = '".LOG_LEVEL_LIST."';";
-require_once "../extensions/jquery-ui-1.7.2.custom/js/jquery-1.3.2.min.js";
-require_once "../extensions/jquery-ui-1.7.1.w.o.effects.min.js";
+require_once(dirname(__FILE__) . "/../extensions/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js");
+require_once(dirname(__FILE__) . "/../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery-ui-1.8.1.custom.js");
 require_once "../extensions/jqjson.js";
 require_once "../../lib/ajax.js";
 require_once "../../lib/exception.js";



More information about the Mapbender_commits mailing list