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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Mar 17 05:45:08 EDT 2010


Author: verenadiewald
Date: 2010-03-17 05:45:07 -0400 (Wed, 17 Mar 2010)
New Revision: 5797

Modified:
   trunk/mapbender/http/javascripts/mod_featureInfo.php
   trunk/mapbender/http/javascripts/mod_featureInfoTunnel.php
Log:
show featureInfo result in jquery dialog popup

Modified: trunk/mapbender/http/javascripts/mod_featureInfo.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_featureInfo.php	2010-03-17 09:15:33 UTC (rev 5796)
+++ trunk/mapbender/http/javascripts/mod_featureInfo.php	2010-03-17 09:45:07 UTC (rev 5797)
@@ -29,6 +29,8 @@
 	var featureInfoPopupHeight = '200';
 if(typeof(featureInfoPopupWidth)==='undefined')
 	var featureInfoPopupWidth = '270';
+if(typeof(featureInfoPopupPosition)==='undefined')
+	var featureInfoPopupPosition = 'center';
 
 var mod_featureInfo_elName = "<?php echo $e_id;?>";
 var mod_featureInfo_frameName = "";
@@ -85,13 +87,18 @@
 		if(urls){
 			for(var i=0;i<urls.length;i++){
 				if(featureInfoLayerPopup == 'true'){
-					var p = new mb_popup({
-						title:'<?php echo _mb("Informations");?>',
-						url:urls[i],
+					$("<iframe id='featureInfo_"+ i + "' title='<?php echo _mb("Information");?>' src='" + urls[i] + "'></iframe>").dialog({
+						bgiframe: true,
+						autoOpen: true,
+						modal: false,
 						width:parseInt(featureInfoPopupWidth, 10),
 						height:parseInt(featureInfoPopupHeight, 10),
-						top:200,
-						left:600
+						position:featureInfoPopupPosition,
+						buttons: {
+							"Ok": function(){
+								$(this).dialog('close').remove();
+							}
+						}
 					});
 				}
 				else

Modified: trunk/mapbender/http/javascripts/mod_featureInfoTunnel.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_featureInfoTunnel.php	2010-03-17 09:15:33 UTC (rev 5796)
+++ trunk/mapbender/http/javascripts/mod_featureInfoTunnel.php	2010-03-17 09:45:07 UTC (rev 5797)
@@ -27,6 +27,8 @@
 	var featureInfoPopupHeight = '200';
 if(typeof(featureInfoPopupWidth)==='undefined')
 	var featureInfoPopupWidth = '270';
+if(typeof(featureInfoPopupPosition)==='undefined')
+	var featureInfoPopupPosition = 'center';	
 
 var mod_featureInfoTunnel_elName = "featureInfoTunnel";
 var mod_featureInfoTunnel_frameName = "";
@@ -84,18 +86,22 @@
 					var cnt = i;
 					mb_ajax_post(path, {'url':currentRequest},function(js_code,status){
 						if(js_code){
-							if(featureInfoLayerPopup == 'true'){
-								var p = new mb_popup({
-									title:"Information",
-									url:path+"?url="+encodeURIComponent(currentRequest),
+							if(featureInfoLayerPopup == 'true') {
+								$("<iframe id='featureInfo_"+ i + "' title='<?php echo _mb("Information");?>' src='" + path + "?url=" + encodeURIComponent(currentRequest) + "'></iframe>").dialog({
+									bgiframe: true,
+									autoOpen: true,
+									modal: false,
 									width:parseInt(featureInfoPopupWidth, 10),
 									height:parseInt(featureInfoPopupHeight, 10),
-									top:200 + cnt*25,
-									left:600 + cnt*25
+									position:featureInfoPopupPosition,
+									buttons: {
+										"Ok": function(){
+											$(this).dialog('close').remove();
+										}
+									}
 								});
-								p.show();
 							}
-							else{
+							else {
 								window.open(path+"?url="+encodeURIComponent(currentRequest), "" , "width="+featureInfoPopupWidth+",height="+featureInfoPopupHeight+",scrollbars=yes,resizable=yes");
 							}
 						}



More information about the Mapbender_commits mailing list