[Mapbender-commits] r3378 - in trunk/mapbender: http/php lib resources/db/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jan 2 04:12:12 EST 2009


Author: christoph
Date: 2009-01-02 04:12:12 -0500 (Fri, 02 Jan 2009)
New Revision: 3378

Removed:
   trunk/mapbender/http/php/mod_help.php
Modified:
   trunk/mapbender/lib/button.js
   trunk/mapbender/resources/db/update/update_2.6.sql
Log:
http://trac.osgeo.org/mapbender/ticket/343

Deleted: trunk/mapbender/http/php/mod_help.php
===================================================================
--- trunk/mapbender/http/php/mod_help.php	2009-01-02 09:11:18 UTC (rev 3377)
+++ trunk/mapbender/http/php/mod_help.php	2009-01-02 09:12:12 UTC (rev 3378)
@@ -1,61 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_help
-# Copyright (C) 2002 CCGIS 
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-include(dirname(__FILE__)."/../include/dyn_php.php");
-
-if(!isset($mod_help_width)){
-	$mod_help_width = 1000;	
-}
-if(!isset($mod_help_height)){
-	$mod_help_height = 1000;	
-}
-?>
-<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'>
-	<map name='mod_help_imagemap'>
-	<?php
-	$gui_id = $_REQUEST["gui_id"];
-	$sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_url <> '' AND e_public = 1";
-	$v = array($gui_id);
-	$t = array('s');
-	$res = db_prep_query($sql, $v, $t);
-	$cnt = 0;
-	while($row = db_fetch_array($res)){ 
-		echo "<area onclick=\"mod_help_disable();";
-		if($row["e_id"] != 'help'){
-			echo "window.open('".$row["e_url"]."');";	
-		}
-		echo "\" ";
-		echo "id=\"helpArea_".$row['e_id']."\" ";
-		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++;
-	}
-	?>
-</map>
\ No newline at end of file

Modified: trunk/mapbender/lib/button.js
===================================================================
--- trunk/mapbender/lib/button.js	2009-01-02 09:11:18 UTC (rev 3377)
+++ trunk/mapbender/lib/button.js	2009-01-02 09:12:12 UTC (rev 3378)
@@ -7,21 +7,37 @@
 var mb_button = [];
 
 function mb_regButton_frame(wii, frameName, param){
+
 	var ind = mb_button.length;
 	mb_button[ind] = new mb_conButton(wii, ind);
 	if (frameName === null) {
 		if (param === null) {
-			eval(wii+"("+ind+")");
+			if (typeof(wii) == "string") {
+				eval(wii+"("+ind+")");
+			}
+			else {
+				wii(ind);
+			}
 		}
 		else {
-			eval(wii+"("+ind+", "+param+")");
+			if (typeof(wii) == "string") {
+				eval(wii + "(" + ind + ", " + param + ")");
+			}
+			else {
+				wii(ind, param);
+			}
 		}
 	}
 	else if (param === null) {
 		eval("window.frames['" + frameName + "']."+wii+"("+ind+")");
 	}
 	else {
-		eval("window.frames['" + frameName + "']."+wii+"("+ind+", "+param+")");
+		if (typeof(wii) == "string") {
+			eval("window.frames['" + frameName + "']."+ wii + "(" + ind + ", " + param + ")");
+		}
+		else {
+			wii(ind, param);
+		}
 	}
 	mb_button[ind].prev = mb_button[ind].src;
 	mb_button[ind].src = mb_button[ind].img_off;

Modified: trunk/mapbender/resources/db/update/update_2.6.sql
===================================================================
--- trunk/mapbender/resources/db/update/update_2.6.sql	2009-01-02 09:11:18 UTC (rev 3377)
+++ trunk/mapbender/resources/db/update/update_2.6.sql	2009-01-02 09:12:12 UTC (rev 3378)
@@ -44,4 +44,39 @@
 UPDATE gui_element SET e_js_file = 'wfs.php', e_target='mapframe1,overview' WHERE e_id = 'wfs';
 
 
-UPDATE gui_element SET e_attributes = 'onload="init()"' WHERE e_id = 'body' AND fkey_gui_id IN ('admin1', 'admin2_de', 'admin2_en', 'admin_de_services', 'admin_en_services');
\ No newline at end of file
+UPDATE gui_element SET e_attributes = 'onload="init()"' WHERE e_id = 'body' AND fkey_gui_id IN ('admin1', 'admin2_de', 'admin2_en', 'admin_de_services', 'admin_en_services');
+
+
+--
+-- scope
+-- ticket #
+--
+
+-- remove event handlers, are now in the script
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'forward' OR e_id = 'back';
+
+-- remove event handlers, are now in the script
+UPDATE gui_element SET e_content = '<div id="mbN" style="position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;">
+<img id="arrow_n" style="position:relative;top:0;left:0" src="../img/arrows/arrow_n.gif" width="15" height="10">
+</div> 
+<div id="mbNE" style="position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;">
+<img id="arrow_ne" style="position:relative;top:0;left:0" src="../img/arrows/arrow_ne.gif" width="10" height="10">
+</div> 
+<div id="mbE" style="position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;">
+<img id="arrow_e" style="position:relative;top:0;left:0" src="../img/arrows/arrow_e.gif" width="10" height="15">
+</div> 
+<div id="mbSE" style="position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;">
+<img id="arrow_se" style="position:relative;top:0;left:0" src="../img/arrows/arrow_se.gif" width="10" height="10">
+</div> 
+<div id="mbS" style="position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;">
+<img id="arrow_s" style="position:relative;top:0;left:0" src="../img/arrows/arrow_s.gif" width="15" height="10">
+</div> 
+<div id="mbSW" style="position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;">
+<img id="arrow_sw" style="position:relative;top:0;left:0" src="../img/arrows/arrow_sw.gif" width="10" height="10">
+</div>
+<div id="mbW" style="position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;">
+<img id="arrow_w" style="position:relative;top:0;left:0" src="../img/arrows/arrow_w.gif" width="10" height="15">
+</div> 
+<div id="mbNW" style="position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;">
+<img id="arrow_nw" style="position:relative;top:0;left:0" src="../img/arrows/arrow_nw.gif" width="10" height="10">
+</div>' WHERE e_id = 'navFrame';



More information about the Mapbender_commits mailing list