[Mapbender-commits] r7664 - branches/2.7/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Feb 28 07:47:12 EST 2011


Author: verenadiewald
Date: 2011-02-28 04:47:12 -0800 (Mon, 28 Feb 2011)
New Revision: 7664

Modified:
   branches/2.7/http/javascripts/mod_featureInfo.php
   branches/2.7/http/javascripts/mod_featureInfoTunnel.php
Log:
http://trac.osgeo.org/mapbender/ticket/792

Modified: branches/2.7/http/javascripts/mod_featureInfo.php
===================================================================
--- branches/2.7/http/javascripts/mod_featureInfo.php	2011-02-28 12:44:13 UTC (rev 7663)
+++ branches/2.7/http/javascripts/mod_featureInfo.php	2011-02-28 12:47:12 UTC (rev 7664)
@@ -94,6 +94,15 @@
 		urls = mod_featureInfo_mapObj.getFeatureInfoRequests(point, ignoreWms);
 		if(urls){
 			for(var i=0;i<urls.length;i++){
+				var cnt = i;
+				if(featureInfoPopupPosition.length == 2 && !isNaN(featureInfoPopupPosition[0]) && !isNaN(featureInfoPopupPosition[1])) {
+					var dialogPosition = [];
+					dialogPosition[0] = featureInfoPopupPosition[0]+cnt*25;
+					dialogPosition[1] = featureInfoPopupPosition[1]+cnt*25;
+				}
+				else {
+					var dialogPosition = featureInfoPopupPosition;
+				}
 				if(featureInfoLayerPopup == 'true'){
 					$("<div><iframe frameborder='0' height='100%' width='100%' id='featureInfo_"+ i + "' title='<?php echo _mb("Information");?>' src='" + urls[i] + "'></iframe></div>").dialog({
 						bgiframe: true,
@@ -101,7 +110,7 @@
 						modal: false,
 						width:parseInt(featureInfoPopupWidth, 10),
 						height:parseInt(featureInfoPopupHeight, 10),
-						position:featureInfoPopupPosition,
+						position:dialogPosition,
 						buttons: {
 							"Ok": function(){
 								$(this).dialog('close').remove();

Modified: branches/2.7/http/javascripts/mod_featureInfoTunnel.php
===================================================================
--- branches/2.7/http/javascripts/mod_featureInfoTunnel.php	2011-02-28 12:44:13 UTC (rev 7663)
+++ branches/2.7/http/javascripts/mod_featureInfoTunnel.php	2011-02-28 12:47:12 UTC (rev 7664)
@@ -120,6 +120,14 @@
 					window.setTimeout("removeProgressWheel()", 10000);
 					var currentRequest = urls[i];
 					var cnt = i;
+					if(featureInfoPopupPosition.length == 2 && !isNaN(featureInfoPopupPosition[0]) && !isNaN(featureInfoPopupPosition[1])) {
+						var dialogPosition = [];
+						dialogPosition[0] = featureInfoPopupPosition[0]+cnt*25;
+						dialogPosition[1] = featureInfoPopupPosition[1]+cnt*25;
+					}
+					else {
+						var dialogPosition = featureInfoPopupPosition;
+					}
 					$(".fiResultFrame").remove();
           
 					mb_ajax_post(path, {'url':currentRequest},function(js_code,status){
@@ -132,7 +140,7 @@
 									modal: false,
 									width:parseInt(featureInfoPopupWidth, 10),
 									height:parseInt(featureInfoPopupHeight, 10),
-									position:featureInfoPopupPosition,
+									position:dialogPosition,
 // This is a workaround if dialogs don't have the appropriate height
 //									height: 450,
 //									open: function(){



More information about the Mapbender_commits mailing list