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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Feb 19 08:34:30 EST 2010


Author: astrid_emde
Date: 2010-02-19 08:34:29 -0500 (Fri, 19 Feb 2010)
New Revision: 5520

Modified:
   trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php
Log:
translations for checkboxes and notice text

Modified: trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php	2010-02-19 11:11:49 UTC (rev 5519)
+++ trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php	2010-02-19 13:34:29 UTC (rev 5520)
@@ -1,7 +1,7 @@
 <?php
 # $Id$
 # http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
-# Copyright (C) 2002 CCGIS 
+# Copyright (C) 2002 CCGIS
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@
 	addwms_zoomToExtent = 0;
 
 	var guis = gui_list.split(',');
-	
+
 	if(gui_list === '') {
 		guis = [];
 	}
@@ -68,35 +68,35 @@
 
 	var loadWmsAndZoomCallback = function (opt) {
 		if (typeof opt === "object" && opt.success) {
-			
+
 			var wmsId = parseInt(opt.wmsId, 10);
 			var map = parent.getMapObjByName('<?php echo $e_target[1]; ?>');
 			var wms = map.wms[map.wms.length - 1];
-			
+
 			if (wms === null) {
 				opt.msg = "Ein unbekannter Fehler ist aufgetreten.";
 			}
 			else {
 				// activate
 				if (typeof opt.visible === "number" && opt.visible === 1) {
-					if (typeof addwms_showWMS === "number" 
+					if (typeof addwms_showWMS === "number"
 						&& addwms_showWMS < wms.objLayer.length) {
-						
+
 						if (addwms_showWMS > 0) {
-						
+
 							try {
 								var msg = "Der hinzugeladene Kartendienst " +
 								"verfügt über mehr als " +
 								addwms_showWMS +
 								" Ebenen. Die Ebenen des Dienstes werden " +
 								"<b>nicht</b> aktiviert.";
-								
+
 								parent.Mapbender.modules.dialogManager.openDialog({
 									content: msg,
 									modal: false,
 									effectShow: 'puff'
 								});
-							} 
+							}
 							catch (e) {
 								new parent.Mb_warning(e.message + ". " + msg);
 							}
@@ -107,7 +107,7 @@
 						parent.handleSelectedWms(map.elementName, wmsId, "visible", 1)
 					}
 				}
-				
+
 				if (typeof opt.zoomToExtent === "number" && opt.zoomToExtent === 1) {
 					// zoom to bbox
 					var bbox_minx, bbox_miny, bbox_maxx, bbox_maxy;
@@ -120,7 +120,7 @@
 							if (bbox_minx === null || bbox_miny === null || bbox_maxx === null || bbox_maxy === null) {
 								continue;
 							}
-							
+
 							map.calculateExtent(new parent.Extent(bbox_minx, bbox_miny, bbox_maxx, bbox_maxy));
 							map.setMapRequest();
 							break;
@@ -135,16 +135,16 @@
 
 	var loadWmsCallback = function (opt) {
 		var msg = typeof opt.msg === "string" ? opt.msg : "";
-		
+
 		if (typeof opt !== "object" || !opt.success) {
 			msg = "Ein unbekannter Fehler ist aufgetreten.";
-		} 
+		}
 		else {
 			var map = parent.getMapObjByName('<?php echo $e_target[1]; ?>');
 			var wms = map.wms[map.wms.length - 1];
-			
+
 			if (wms !== null) {
-				msg = "Der folgende Dienst wurde zu 'Aktive Dienste' " + 
+				msg = "Der folgende Dienst wurde zu 'Aktive Dienste' " +
 					"hinzugefügt:<br><br>";
 				msg += "<b>" + wms.wms_title + "</b>";
 			}
@@ -166,7 +166,7 @@
 
 
 	function mod_addWMSfromfilteredList(pointer_name, version, options){
-	
+
 		pointer_name=pointer_name + parent.mb_getConjunctionCharacter(pointer_name);
 		if (version == '1.0.0'){
 			var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
@@ -179,12 +179,12 @@
 		else if (version == '1.1.1'){
 			var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
 			var load = cap;
-		}  
+		}
 		if(load){
 			parent.mod_addWMS_load(load, options);
 		}
 	}
-	
+
 	function mod_addWmsfromURL(){
 		var capabilities = document.getElementById('CapURL').value;
 		var zoomToExtent = document.getElementById('addwms-zoom').checked ? 1 : 0;
@@ -258,7 +258,7 @@
 		document.getElementById('resultString').innerHTML = text;
 		document.getElementById('titleLeft').innerHTML    = titleLeft;
 		document.getElementById('titleRight').innerHTML   = titleRight;
-		
+
 		removeChildNodes(document.getElementById('resultTableBody'));
 	}
 
@@ -269,7 +269,7 @@
 		var leftTableCellContent  = document.createElement('strong');
 		var rightTableCellContent = document.createElement('em');
 		var tableRow              = document.createElement('tr');
-				
+
 		leftTableCellContent.innerHTML  = leftText;
 		rightTableCellContent.innerHTML = rightText;
 
@@ -277,7 +277,7 @@
 		rightTableCell.appendChild(rightTableCellContent);
 		tableRow.appendChild(leftTableCell);
 		tableRow.appendChild(rightTableCell);
-		
+
 		tableRow.onclick = function () {
 			eval(onClick);
 		}
@@ -316,9 +316,9 @@
 		if (typeof addwms_showWMS === "number" && addwms_showWMS > 0) {
 			document.getElementById("addwms-show").checked = "checked";
 		}
-		if (typeof addwms_zoomToExtent === "number" 
+		if (typeof addwms_zoomToExtent === "number"
 			&& addwms_zoomToExtent === 1) {
-			
+
 			document.getElementById("addwms-zoom").checked = "checked";
 		}
 	}
@@ -330,8 +330,8 @@
 
 		// If only one is active load list imidiately
 		if(
-			parseInt(option_dbgui) + 
-			parseInt(option_dbgroup) + 
+			parseInt(option_dbgui) +
+			parseInt(option_dbgroup) +
 			parseInt(option_dball)
 		=== 1) {
 			if(option_dball === 1){
@@ -347,7 +347,7 @@
 			if(optionButton) {
 				optionButton.onclick();
 				containerButtons.parentNode.removeChild(containerButtons);
-				
+
 				return;
 			}
 		}
@@ -364,7 +364,7 @@
 			optionButton = document.getElementById('button_dbGui');
 			optionButton.parentNode.removeChild(optionButton);
 		}
-		
+
 		if(capabilitiesInput === 0) {
 			optionButton = document.getElementById('capabilitiesForm');
 			optionButton.parentNode.removeChild(optionButton);
@@ -375,10 +375,10 @@
 	function displayGroups (groupArray) {
 		if (groupArray.length > 0) {
 			setTableHeader(selectGroupText, groupNameText, groupAbstractText);
-			
+
 			for (var i = 0; i < groupArray.length; i++) {
 				var onClick = "getWMSByGroup('" + groupArray[i].id + "')";
-				addTableRow(groupArray[i].name, groupArray[i].description, onClick);	
+				addTableRow(groupArray[i].name, groupArray[i].description, onClick);
 			}
 		}
 		else {
@@ -389,19 +389,19 @@
 	function displayGUIs (guiArray) {
 		if (guiArray.length > 0) {
 			setTableHeader(selectGuiText, guiNameText, guiAbstractText);
-			
+
 			for (var i = 0; i < guiArray.length; i++) {
 				var onClick = "getWMSByGUI('" + guiArray[i].id + "')";
 				if(guis.length>0){
 					for(var j=0; j < guis.length; j++){
 						if(guiArray[i].id==guis[j]){
-							addTableRow(guiArray[i].name, guiArray[i].description, onClick);	
+							addTableRow(guiArray[i].name, guiArray[i].description, onClick);
 							break;
 						}
 					}
 				}
 				else
-					addTableRow(guiArray[i].name, guiArray[i].description, onClick);	
+					addTableRow(guiArray[i].name, guiArray[i].description, onClick);
 			}
 		}
 		else {
@@ -416,24 +416,24 @@
 			for (var i = 0; i < wmsArray.length; i++) {
 
 				if (global_source == "db" && typeof(guiId) !== "undefined" ) {
-					var onClick = "parent.mod_addWMSById_ajax(" + 
-						"'" + guiId + "', '" + wmsArray[i].id + "', {" + 
-							"callback: function (opt) {" + 
-								"if (typeof opt === 'object' && opt.success) {" + 
-									"var wmsId = parseInt(opt.wmsId, 10);" + 
-									"var map = getMapObjByName('<?php echo $e_target[0]; ?>');" + 
-									"handleSelectedWms(map.elementName, wmsId, 'visible', 0);" + 
-									"handleSelectedWms(map.elementName, wmsId, 'querylayer', 0);" + 
-								"}" + 
+					var onClick = "parent.mod_addWMSById_ajax(" +
+						"'" + guiId + "', '" + wmsArray[i].id + "', {" +
+							"callback: function (opt) {" +
+								"if (typeof opt === 'object' && opt.success) {" +
+									"var wmsId = parseInt(opt.wmsId, 10);" +
+									"var map = getMapObjByName('<?php echo $e_target[0]; ?>');" +
+									"handleSelectedWms(map.elementName, wmsId, 'visible', 0);" +
+									"handleSelectedWms(map.elementName, wmsId, 'querylayer', 0);" +
+								"}" +
 								"loadWmsCallback(opt);}});";
-				}		
+				}
 				else {
-					var onClick = "mod_addWMSfromfilteredList(\"" + 
-					wmsArray[i].getCapabilitiesUrl + "\",\"" + 
-					wmsArray[i].version+"\", {" + 
-					"zoomToExtent: 0, " + 
-					"visible: 0, " + 
-					"callback: loadWmsCallback" + 
+					var onClick = "mod_addWMSfromfilteredList(\"" +
+					wmsArray[i].getCapabilitiesUrl + "\",\"" +
+					wmsArray[i].version+"\", {" +
+					"zoomToExtent: 0, " +
+					"visible: 0, " +
+					"callback: loadWmsCallback" +
 					"});";
 				}
 				addTableRow(wmsArray[i].title, wmsArray[i].abstract, onClick);
@@ -464,23 +464,23 @@
 <body onLoad="setButtons();setDefaults();">
 <h1><?php echo _mb("Add WMS"); ?></h1>
 <p><?php echo _mb("Enter a Capabilities-URL of a WMS or select one or more WMS from list."); ?></p>
-<p><em><?php echo _mb("Hint: Possibly you need to zoom in for showing layers from external map service. The operator of the external service is responsible for the display ranges. PortalU does not have a stake in this behaviour."); ?></em></p>
+<p><em><?php echo _mb("Notice: Be aware of the scale hints. Possibly you need to zoom in to display the added service."); ?></em></p>
 
 <form id="capabilitiesForm" name="addURLForm" method="post" action="">
 <fieldset id="container_capabilities">
 <legend>Capabilities</legend>
 	<p>
-		<label for="CapURL"><?php echo _mb("Capabilities-URL"); ?>:</label> 
-		<input type="text" id="CapURL" name="CapURL" /> 
+		<label for="CapURL"><?php echo _mb("Capabilities-URL"); ?>:</label>
+		<input type="text" id="CapURL" name="CapURL" />
 		<input type="button" id="addCapURL" name="addCapURL" value="<?php echo _mb("Add WMS"); ?>" onclick="mod_addWmsfromURL();" /><br />
 	</p>
 	<p style="padding:0 0 4px 0;">
 		<input style="margin-left: 12em;" type="checkbox" id="addwms-show" />
-		<label style='display:inline;float:none;cursor:pointer' for="addwms-show">Ebenen des Kartendienstes aktivieren</label>
+		<label style='display:inline;float:none;cursor:pointer' for="addwms-show"><?php echo _mb("activate layers"); ?></label>
 	</p>
 	<p style="padding:0 0 4px 0;">
 		<input style="margin-left: 12em;" type="checkbox" id="addwms-zoom" />
-		<label style='display:inline;float:none;cursor:pointer' for="addwms-zoom">Auf Ebenenausdehnung des Kartendienstes heranzoomen</label> 
+		<label style='display:inline;float:none;cursor:pointer' for="addwms-zoom"><?php echo _mb("zoom to extent"); ?></label>
 	</p>
 </fieldset>
 </form>
@@ -490,15 +490,15 @@
 <legend>WMS list(s)</legend>
 	<p>
 		<input type="button" name="button_dbAll"   id="button_dbAll"   value="<?php echo _mb("List all WMS"); ?>" onclick="setSource('db');getWMSByGUI(gui_list)">
-		<input type="button" name="button_dbGroup" id="button_dbGroup" value="<?php echo _mb("List WMS by Group"); ?>"   onclick="setSource('db');getGroups()"> 
-		<input type="button" name="button_dbGui"   id="button_dbGui"   value="<?php echo _mb("List WMS by Application"); ?>"     onclick="setSource('db');getGUIs()"> 
+		<input type="button" name="button_dbGroup" id="button_dbGroup" value="<?php echo _mb("List WMS by Group"); ?>"   onclick="setSource('db');getGroups()">
+		<input type="button" name="button_dbGui"   id="button_dbGui"   value="<?php echo _mb("List WMS by Application"); ?>"     onclick="setSource('db');getGUIs()">
 	</p>
 </fieldset>
 </form>
 
 <p id="progressIndicator" name="progressIndicator">
 	<img src="../img/indicator_wheel.gif" />
-	<?php echo _mb("Loading"); ?> ... 
+	<?php echo _mb("Loading"); ?> ...
 </p>
 
 <h2 id="resultString" name="resultString"></h2>



More information about the Mapbender_commits mailing list