[Mapbender-commits] r8661 - branches/2.7/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jun 24 07:15:15 PDT 2013


Author: astrid_emde
Date: 2013-06-24 07:15:15 -0700 (Mon, 24 Jun 2013)
New Revision: 8661

Modified:
   branches/2.7/http/javascripts/mod_coordsLookup.php
Log:
Button new to de?\195?\182lete the marker and empty the coordinate fields

Modified: branches/2.7/http/javascripts/mod_coordsLookup.php
===================================================================
--- branches/2.7/http/javascripts/mod_coordsLookup.php	2013-06-19 12:44:53 UTC (rev 8660)
+++ branches/2.7/http/javascripts/mod_coordsLookup.php	2013-06-24 14:15:15 UTC (rev 8661)
@@ -102,7 +102,10 @@
 //		Perimeter select
 		this.perimeterSelect           = $(document.createElement('select')).attr({'id':'perimeter-select'}).appendTo(this.perimeterSelectContainer);		
 //		Trigger button
-		this.triggerButton             = $(document.createElement('input')).attr({'id':'trigger-button','type':'button','value':'<?php echo _mb("zoom to coordinates");?>'}).appendTo(this.triggerButtonContainer);		
+		this.triggerButton             = $(document.createElement('input')).attr({'id':'trigger-button','type':'button','value':'<?php echo _mb("zoom to coordinates");?>'}).appendTo(this.triggerButtonContainer);
+//		Trigger button
+		this.triggerButtonNew          = $(document.createElement('input')).attr({'id':'trigger-button','type':'button','value':'<?php echo _mb("new");?>'}).appendTo(this.triggerButtonContainer);		
+		
 	};
 	
 	this.initForm = function() {
@@ -128,6 +131,11 @@
 		$(this.triggerButton).click(function() {
 			Mapbender.modules[options.id].zoomToCoordinates();
 		});
+		
+//		Set action for trigger button new - empty fields and delete marker
+		$(this.triggerButtonNew).click(function() {
+			Mapbender.modules[options.id].emptyFieldsAndMarker();
+		});		
 	};
 	
 	this.zoomToCoordinates = function() {
@@ -182,6 +190,14 @@
 
 	};
 	
+	this.emptyFieldsAndMarker = function() {
+				if(standingHighlight !== null){ 
+					standingHighlight.clean();
+				}
+				this.coordXInput.val('');
+				this.coordYInput.val('');
+	}
+	
 	this.transformProjection = function() {
 		var parameters = {
 			fromSrs: this.coords.sourceProjection,



More information about the Mapbender_commits mailing list