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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Dec 15 16:04:02 EST 2010


Author: marc
Date: 2010-12-15 13:04:02 -0800 (Wed, 15 Dec 2010)
New Revision: 7311

Modified:
   trunk/mapbender/http/javascripts/mod_coordsLookup.js
Log:
#524

Modified: trunk/mapbender/http/javascripts/mod_coordsLookup.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_coordsLookup.js	2010-12-14 21:43:07 UTC (rev 7310)
+++ trunk/mapbender/http/javascripts/mod_coordsLookup.js	2010-12-15 21:04:02 UTC (rev 7311)
@@ -51,12 +51,12 @@
 // 3802000 / 5825000
 var CoordsLookup = function() {
 	var that = this;
-
 	if(
 		typeof options.target      === 'undefined' || options.target.length      === 0 || 
 		typeof options.projections === 'undefined' || options.projections.length === 0 || 
 		typeof options.perimeters  === 'undefined' || options.perimeters.length  === 0
 	) {
+		
 		return;
 	}
 
@@ -84,9 +84,10 @@
 	this.initForm = function() {
 //		Fill projection select with options
 		for(var i = 0; i < options.projections.length; i++) {
-			$(new Option(options.projections[i],options.projections[i])).appendTo(this.projectionSelect);
+			$(this.projectionSelect).append('<option value=' + options.projections[i] + ' >' + options.projections[i] + '</option>');
 		}
-		$(new Option('Projektionssystem','',true,true)).prependTo(this.projectionSelect);
+		//$(new Option('Projektionssystem','Projektionssystem',true,true)).prependTo(this.projectionSelect);
+		$(this.projectionSelect).prepend('<option value="Projektionssystem" selected=selected>Projektionssystem</option>');
 
 //		Fill perimeter select with options	
 		for(var i = 0; i < options.perimeters.length; i++) {
@@ -94,9 +95,9 @@
 			
 			optionValue = (optionValue.length < 4) ? (optionValue + ' m') : optionValue.replace(/(\d+)(\d{3})/, '$1' + '.' + '$2' + ' m');
 			
-			$(new Option(optionValue,options.perimeters[i])).appendTo(this.perimeterSelect);
+			$(this.perimeterSelect).append('<option value=' + optionValue + ' >' + optionValue + '</option>');
 		}
-		$(new Option('Umkreis','',true,true)).prependTo(this.perimeterSelect);
+		$(this.perimeterSelect).prepend('<option value="Umkreis" >Umkreis</option>');
 		
 //		Set action for trigger button
 		$(this.triggerButton).click(function() {



More information about the Mapbender_commits mailing list