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

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


Author: christoph
Date: 2009-01-02 04:05:49 -0500 (Fri, 02 Jan 2009)
New Revision: 3373

Modified:
   trunk/mapbender/http/javascripts/mod_sandclock.php
   trunk/mapbender/http/javascripts/mod_saveWKT.js
   trunk/mapbender/http/javascripts/mod_scaleSel.php
   trunk/mapbender/http/javascripts/mod_scalebar.php
   trunk/mapbender/http/javascripts/mod_setBBOX1.php
   trunk/mapbender/http/javascripts/mod_setBackground.php
   trunk/mapbender/http/javascripts/mod_setPOI2Scale.php
Log:
http://trac.osgeo.org/mapbender/ticket/343

Modified: trunk/mapbender/http/javascripts/mod_sandclock.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_sandclock.php	2009-01-02 09:01:41 UTC (rev 3372)
+++ trunk/mapbender/http/javascripts/mod_sandclock.php	2009-01-02 09:05:49 UTC (rev 3373)
@@ -31,7 +31,9 @@
 var mod_sandclock_img = new Image();
 mod_sandclock_img.src = mod_sandclock_image;
 
-mb_registerSubFunctions("mod_sandclock(true,myMapId)");
+eventAfterMapRequest.register(function (obj) {
+	mod_sandclock(true,obj.myMapId);
+});
 
 function mod_sandclock(start,myMapId){
 	var ind = getMapObjIndexByName(mod_sandclock_target);
@@ -40,7 +42,9 @@
 		writeTag(mod_sandclock_target, "sandclock", temp);
 		mb_arrangeElement(mod_sandclock_target, "sandclock", (mb_mapObj[ind].width/2 - 16), (mb_mapObj[ind].height/2 - 16));
 	}
-	aktiv = setTimeout("mod_sandclock('','"+myMapId+"')",10);
+	aktiv = setTimeout(function () {
+		mod_sandclock('',myMapId);
+		},10);
 	var myMapIdArray = myMapId.split(",");
 	var complete = true;
 	var myMapId;
@@ -55,4 +59,4 @@
 		clearTimeout(aktiv);
 		writeTag(mod_sandclock_target, "sandclock", "");
 	} 
-}
\ No newline at end of file
+}

Modified: trunk/mapbender/http/javascripts/mod_saveWKT.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_saveWKT.js	2009-01-02 09:01:41 UTC (rev 3372)
+++ trunk/mapbender/http/javascripts/mod_saveWKT.js	2009-01-02 09:05:49 UTC (rev 3373)
@@ -1,7 +1,9 @@
 var mod_saveWKT_img = new Image();
 var mod_saveWKT_win = null;
 mod_saveWKT_img.src = "../img/button_gray/save.gif";
-register_measureSubFunctions("mod_saveWKT()");
+eventAfterMeasure.register(function () {
+	return mod_saveWKT();
+});
 
 function mod_saveWKT(){
 	var str =  "<div style='position:absolute;top:75px' onmouseup='parent.mod_saveWKT_go()' ";

Modified: trunk/mapbender/http/javascripts/mod_scaleSel.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_scaleSel.php	2009-01-02 09:01:41 UTC (rev 3372)
+++ trunk/mapbender/http/javascripts/mod_scaleSel.php	2009-01-02 09:05:49 UTC (rev 3373)
@@ -20,7 +20,9 @@
 require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 echo "var mod_scaleSelect_target = '".$e_target[0]."';";
 ?>
-mb_registerSubFunctions("mod_scaleSelect_val(frameName)");
+eventAfterMapRequest.register(function (obj) {
+	mod_scaleSelect_val(obj.frameName);
+});
 function mod_scaleSelect(obj){
 	var ind = obj.selectedIndex;
 	mb_repaintScale(mod_scaleSelect_target,null,null,obj.options[ind].value);

Modified: trunk/mapbender/http/javascripts/mod_scalebar.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_scalebar.php	2009-01-02 09:01:41 UTC (rev 3372)
+++ trunk/mapbender/http/javascripts/mod_scalebar.php	2009-01-02 09:05:49 UTC (rev 3373)
@@ -29,7 +29,9 @@
 var mod_scalebar_font = "Arial, Helvetica, sans-serif";
 var mod_scalebar_fontsize = "9px";
 
-mb_registerSubFunctions("mod_scalebar()");
+eventAfterMapRequest.register(function () {
+	mod_scalebar();
+});
 function mod_scalebar(){
 	var scale = mb_getScale(mod_scalebar_target);
 	var ind = getMapObjIndexByName(mod_scalebar_target);

Modified: trunk/mapbender/http/javascripts/mod_setBBOX1.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_setBBOX1.php	2009-01-02 09:01:41 UTC (rev 3372)
+++ trunk/mapbender/http/javascripts/mod_setBBOX1.php	2009-01-02 09:05:49 UTC (rev 3373)
@@ -20,7 +20,9 @@
 require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 echo "var mod_setBBOX_target = '".$e_target[0]."';";
 ?>
-mb_registerInitFunctions("mod_setBBOX_init()");
+eventInit.register(function () {
+	mod_setBBOX_init();
+});
 function mod_setBBOX_init(){
 	var my_target = mod_setBBOX_target.split(",");
 	var myBBOX = "<?php echo $_SESSION['mb_myBBOX'] ?>";

Modified: trunk/mapbender/http/javascripts/mod_setBackground.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_setBackground.php	2009-01-02 09:01:41 UTC (rev 3372)
+++ trunk/mapbender/http/javascripts/mod_setBackground.php	2009-01-02 09:05:49 UTC (rev 3373)
@@ -27,7 +27,9 @@
 echo "var mod_setBackground_wms = ".$wms.";";
 echo "var mod_setBackground_target = '".$e_target[0]."';";
 ?>
-mb_registerInitFunctions("mod_setBackground_init()");
+eventInit.register(function () {
+	mod_setBackground_init();
+});
 var mod_setBackground_active = false;
 function mod_setBackground_init(){
 	var setBackgroundSelectBox = document.setBackground.mod_setBackground_list;

Modified: trunk/mapbender/http/javascripts/mod_setPOI2Scale.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_setPOI2Scale.php	2009-01-02 09:01:41 UTC (rev 3372)
+++ trunk/mapbender/http/javascripts/mod_setPOI2Scale.php	2009-01-02 09:05:49 UTC (rev 3373)
@@ -30,7 +30,9 @@
 	mod_setPOI2Scale_defScale = 5000;
 }
 
-mb_registerInitFunctions("mod_setPOI2Scale()");
+eventInit.register(function () {
+	mod_setPOI2Scale();
+});
 
 function mod_setPOI2Scale(){
 	var my_target = mod_setPOI2Scale_target.split(",");



More information about the Mapbender_commits mailing list