svn commit: r390 - trunk/mapbender/http/php/mod_help.php

uli at osgeo.org uli at osgeo.org
Wed Jun 7 09:29:11 EDT 2006


Author: uli
Date: 2006-06-07 13:29:11+0000
New Revision: 390

Modified:
   trunk/mapbender/http/php/mod_help.php

Log:
highlighting of elements with available help url included

Modified: trunk/mapbender/http/php/mod_help.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_help.php?view=diff&rev=390&p1=trunk/mapbender/http/php/mod_help.php&p2=trunk/mapbender/http/php/mod_help.php&r1=389&r2=390
==============================================================================
--- trunk/mapbender/http/php/mod_help.php	(original)
+++ trunk/mapbender/http/php/mod_help.php	2006-06-07 13:29:11+0000
@@ -24,9 +24,20 @@
 ?>
 <html>
 <head><title></title></head>
-<script language="JavaScript" type="text/javascript">
+<script language="JavaScript" type="text/javascript">
+<?php
+$e_id_css = 'help';
+$gui_id = $_REQUEST["gui_id"];
+include("../include/dyn_php.php");
+if(!isset($mod_help_width)){
+	$mod_help_width = 1000;	
+}
+if(!isset($mod_help_height)){
+	$mod_help_height = 1000;	
+}
+?>
 function init(){
-	var str = "<img src='../img/transparent.gif' style='cursor:help' width='1000' height='1000' usemap='#mod_help_imagemap' border='0'>";
+	var str = "<img src='../img/transparent.gif' style='cursor:help' width='<?php echo $mod_help_width ?>' height='<?php echo $mod_help_height ?>' usemap='#mod_help_imagemap' border='0'>";
 	str += "<map name='mod_help_imagemap'>";
 	<?php
 	$gui_id = $_REQUEST["gui_id"];
@@ -36,12 +47,23 @@
 	$res = db_prep_query($sql, $v, $t);
 	$cnt = 0;
 	while($row = db_fetch_array($res)){ 
-		echo "str += '<area onmouseover=\"mod_help_highlight(this,true)\" onmouseout=\"mod_help_highlight(this,false)\" shape=\"rect\" coords=\"".$row['e_left'].",".$row['e_top'].",";
-		echo ($row['e_left']+$row['e_width']).",".($row['e_top']+$row['e_height'])."\" href=\"".$row["e_url"]."\" alt=\"HELP: ".$row["e_url"]."\" title=\"HELP: ".$row["e_url"]."\" ";
+		echo "str += '<area onclick=\"parent.mod_help_disable();";
 		if($row["e_id"] != 'help'){
-			echo "target=\"_blank\"";	
+			echo "window.open(\'".$row["e_url"]."\');";	
 		}
-		echo ">';";
+		echo "\"";
+		echo "shape=\"rect\" coords=\"".$row['e_left'].",".$row['e_top'].",";		
+		echo ($row['e_left']+$row['e_width']).",".($row['e_top']+$row['e_height'])."\" ";
+//		echo "href=\"".$row["e_url"]."\" ";		
+		echo "href=\"javascript:\" ";
+		if($row["e_id"] != 'help'){
+			echo "alt=\"HELP: ".$row["e_url"]."\" title=\"HELP: ".$row["e_url"]."\" ";
+			#echo "target=\"_blank\"";	
+		}
+		else{
+			echo "alt=\"HELP: ".$mod_help_text."\" title=\"HELP: ".$mod_help_text."\" ";
+		}
+		echo " nohref>';";
 		$cnt++;
 	}
 	?>




More information about the Mapbender_commits mailing list