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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jun 26 06:30:26 EDT 2009


Author: verenadiewald
Date: 2009-06-26 06:30:26 -0400 (Fri, 26 Jun 2009)
New Revision: 4240

Modified:
   trunk/mapbender/http/javascripts/mod_repaint.php
Log:
Mapbender API

Modified: trunk/mapbender/http/javascripts/mod_repaint.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_repaint.php	2009-06-26 09:57:33 UTC (rev 4239)
+++ trunk/mapbender/http/javascripts/mod_repaint.php	2009-06-26 10:30:26 UTC (rev 4240)
@@ -1,7 +1,7 @@
 <?php
 # $Id$
 # http://www.mapbender.org/index.php/mod_repaint.php
-# Copyright (C) 2002 CCGIS 
+# 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
@@ -16,25 +16,21 @@
 # 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");
 ?>
-var mod_repaint_img = new Image(); 
-mod_repaint_img.src = "<?php  echo $e_src;  ?>";
-var mod_repaint_img_over = new Image(); 
-mod_repaint_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
-
-function mod_repaint(){
-	zoom("<?php  echo $e_target[0];  ?>", true,0.999);
-}
-function mod_repaint_init(obj){
-	document.getElementById("repaint").src = mod_repaint_img_over.src;
-	obj.onmouseover = new Function("mod_repaint_over()");
-	obj.onmouseout = new Function("mod_repaint_out()");
-}
-function mod_repaint_over(){
-	document.getElementById("repaint").src = mod_repaint_img_over.src;
-}
-function mod_repaint_out(){
-	document.getElementById("repaint").src = mod_repaint_img.src;
-}
+$(this).click(function () {
+	if (!options.target) {
+		return;
+	}
+	if (!Mapbender.modules[options.target]) {
+		return;
+	}
+	Mapbender.modules[options.target].zoom(true, 0.999);
+}).mouseover(function () {
+	if (options.src) {
+		this.src = options.src.replace(/_off/, "_over");
+	}
+}).mouseout(function () {
+	if (options.src) {
+		this.src = options.src;
+	}
+});



More information about the Mapbender_commits mailing list