[Mapbender-commits] r3385 - in trunk/mapbender/http: css html

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jan 2 07:30:55 EST 2009


Author: nimix
Date: 2009-01-02 07:30:55 -0500 (Fri, 02 Jan 2009)
New Revision: 3385

Modified:
   trunk/mapbender/http/css/treeGDE2.css
   trunk/mapbender/http/html/mod_treefolderPlain.php
Log:
http://trac.osgeo.org/mapbender/ticket/360

Modified: trunk/mapbender/http/css/treeGDE2.css
===================================================================
--- trunk/mapbender/http/css/treeGDE2.css	2009-01-02 11:45:14 UTC (rev 3384)
+++ trunk/mapbender/http/css/treeGDE2.css	2009-01-02 12:30:55 UTC (rev 3385)
@@ -1,47 +1,50 @@
-a {
+#treeGDE a {
 	text-decoration:none;
 	color:black;
 }
-a.node
+#treeGDE a.node
 {
 	vertical-align:middle;
 }
-a:link
+#treeGDE a:link
 {
 	color: #000000;
 }
-a:visited
+#treeGDE a:visited
 {
 	color: #000000;
 }
-a:hover
+#treeGDE a:hover
 {
 	color: #8080FF;
 	text-decoration:underline;
 }
-table
+#treeGDE table
 {
 	font-size:8pt;
 	line-height:8pt;
+	margin: 0px;
+	padding: 0px;
 }
-table.menu
+#treeGDE table.menu
 {
 	background-color: #ffffff;
 	border: 1px solid #999999
 }
-td
+#treeGDE tr td
 {
 	color: #000000;
-	font-family: Verdana
+	font-family: Verdana;
+	padding: 0px;
 }
-img
+#treeGDE img
 {
 	border:none;
 	padding:0px;
 	margin:0px;
 	vertical-align:middle;		
 }
-input
+#treeGDE input
 {
 	margin-top:0px;
 	margin-bottom:0px;

Modified: trunk/mapbender/http/html/mod_treefolderPlain.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolderPlain.php	2009-01-02 11:45:14 UTC (rev 3384)
+++ trunk/mapbender/http/html/mod_treefolderPlain.php	2009-01-02 12:30:55 UTC (rev 3385)
@@ -39,7 +39,7 @@
 msgObj.tooltipMoveSelectionUp = '<?php echo _mb("Moves the selection up");?>';
 msgObj.tooltipMoveSelectionDown = '<?php echo _mb("Moves the selection down");?>';
 
-var jst_container = "document.getElementById('treeGDE')";
+var jst_container = "document.getElementById('treeContainer')";
 var jst_image_folder = imagedir;
 var jst_display_root = false;
 var defaultTarget = 'examplemain';
@@ -258,6 +258,15 @@
 }
 
 function loadTree(){
+	if(wmsbuttons=='true'){
+		var div = document.createElement("div");
+		div.innerHTML = '<a href="javascript:move_up()"><img title="'+msgObj.tooltipMoveSelectionUp+'" src="'+imagedir+'/move_up.png" alt="move up" style="position:relative;top:0px;left:0px;"/></a><a href="javascript:move_down()"><img title="'+msgObj.tooltipMoveSelectionDown+'" src="'+imagedir+'/move_down.png" alt="move down" style="position:relative;top:0px;left:-3px"/></a><a href="javascript:remove_wms()"><img title="'+msgObj.tooltipRemoveWms+'" src="'+imagedir+'/delete_wms.png" alt="remove wms" style="position:relative;top:0px;left:-6px"/></a>';
+		document.getElementById("treeGDE").appendChild(div);
+	}
+	var div = document.createElement("div");
+	div.id = "treeContainer"
+	document.getElementById("treeGDE").appendChild(div);
+
 	if(window.opera){
 		setTimeout('operaLoad()',200);	
 		return;
@@ -306,7 +315,7 @@
 
 function checkComplete(wms, map, img, first){
 	var ind= getMapObjIndexByName(mod_treeGDE_map);
-	if( mb_mapObj[ind].wms[wms].mapURL == false ||  frames[mod_treeGDE_map].document.getElementById(map).complete){
+	if( mb_mapObj[ind].wms[wms].mapURL == false ||  mb_mapObj[ind].getDomElement().ownerDocument.getElementById(map).complete){
 		if(state[wms]!=-1){
 			for(var i=1;i< mb_mapObj[ind].wms[wms].objLayer.length;i++){
 				if( mb_mapObj[ind].wms[wms].objLayer[i].gui_layer_visible==1){
@@ -344,8 +353,8 @@
 		return;
 	}
 	for(var wms=0;wms< mb_mapObj[ind].wms.length;wms++){
-		var wmsimgid="map_"+wms;
-		if( frames[mod_treeGDE_map].document.getElementById(wmsimgid)){
+		var wmsimgid=mod_treeGDE_map+"_map_"+wms;
+		if( mb_mapObj[ind].getDomElement().ownerDocument.getElementById(wmsimgid)){
 			checkComplete(wms, wmsimgid, arrNodes[0][0]+'|wms_'+ mb_mapObj[ind].wms[wms].wms_id, true);
 		}
 	}
@@ -685,10 +694,3 @@
 		}
 	}
 }
-if(wmsbuttons=='true'){
-	document.writeln("<div>"); 
-	document.writeln('<a href="javascript:move_up()"><img title="'+msgObj.tooltipMoveSelectionUp+'" src="'+imagedir+'/move_up.png" alt="move up" style="position:relative;top:0px;left:0px;"/></a>'); 
-	document.writeln('<a href="javascript:move_down()"><img title="'+msgObj.tooltipMoveSelectionDown+'" src="'+imagedir+'/move_down.png" alt="move down" style="position:relative;top:0px;left:-3px"/></a>'); 
-	document.writeln('<a href="javascript:remove_wms()"><img title="'+msgObj.tooltipRemoveWms+'" src="'+imagedir+'/delete_wms.png" alt="remove wms" style="position:relative;top:0px;left:-6px"/></a>'); 
-	document.writeln("</div>"); 
-}



More information about the Mapbender_commits mailing list