[Mapbender-commits] r7581 - in trunk/mapbender: http/javascripts resources/locale/de_DE/LC_MESSAGES

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Feb 13 14:25:19 EST 2011


Author: marc
Date: 2011-02-13 11:25:19 -0800 (Sun, 13 Feb 2011)
New Revision: 7581

Modified:
   trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js
   trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po
Log:
#769

Modified: trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js	2011-02-13 12:17:38 UTC (rev 7580)
+++ trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js	2011-02-13 19:25:19 UTC (rev 7581)
@@ -11,6 +11,8 @@
 //			wms[wms.length-1].wms_id = parseInt(mb_mapObj[ind].wms[i].wms_id, 10) + 1;
 //		}
 //	} 
+	
+
 	mb_mapObj[ind].wms[mb_mapObj[ind].wms.length] = wms[wms.length-1];
 	mb_mapObj[ind].layers[mb_mapObj[ind].layers.length] = layers;
 	mb_mapObj[ind].styles[mb_mapObj[ind].styles.length] = styles;
@@ -149,19 +151,30 @@
 	// abort if WMS is already loaded
 	var map = getMapObjByName('mapframe1');
 	var wms = map.getWmsById(wms_id);
+
+	var originalI18nObject = {
+			"messageHint": "Hint",
+			"messageMsg": "The selected service is already activated in your application and will not be included again:"
+	};	
+
+	var translatedI18nObject = Mapbender.cloneObject(originalI18nObject);	
+	
 	if (wms !== null) {
 		try {
-			var msg = "Der folgende Dienst befindet sich bereits unter " + 
-				"'Aktive Dienste', und wird nicht erneut hinzugefügt:" + 
-				"<br><br><b>" + wms.wms_title + "</b>";
-			Mapbender.modules.dialogManager.openDialog({
-				content: msg,
-				modal: false,
-				effectShow: 'puff'
-			});
+				
+			var $msg = $('<div>' + translatedI18nObject.messageMsg + '<br /><b>' + wms.wms_title + '</b></div>');
+			$msg.dialog({
+					title: translatedI18nObject.messageHint,
+					bgiframe: true,
+					autoOpen: true,
+					modal: false,
+					width: 300,
+					height: 200,
+					pos: [100,50]
+				});			
 		}
 		catch (e) {
-			new Mb_warning(e.message + ". " + msg);
+			new Mb_warning(e.message + ". " + translatedI18nObject.messageMsg);
 		}
 		return;		
 	}
@@ -186,8 +199,17 @@
 		}
 		mod_addWms_general(js, opt);
 	});
+	
+	Mapbender.events.localize.register(function(){
+		Mapbender.modules.i18n.queue(options.id, originalI18nObject, function(translatedI18nObject){
+			$('.labelLoadError').text(translatedI18nObject.labelLoadError); 
+			$('.labelUrlBox').text(translatedI18nObject.labelUrlBox); 
+		});
+	});
 }
 
+
+
 function mod_addWMS_refresh(){
 	mb_mapObjaddWMS('mapframe1');
 	mb_execloadWmsSubFunctions();

Modified: trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po
===================================================================
--- trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po	2011-02-13 12:17:38 UTC (rev 7580)
+++ trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po	2011-02-13 19:25:19 UTC (rev 7581)
@@ -2290,3 +2290,6 @@
 msgid "Response time"
 msgstr "Antwortzeit"
 
+#:../http/javascripts/mod_addWMSgeneralFunctions.js
+msgid "The selected service is already activated in your application and will not be included again:"
+msgstr "Der folgende Dienst befindet sich bereits unter 'Aktive Dienste', und wird nicht erneut hinzugefügt:"



More information about the Mapbender_commits mailing list