[Mapbender-commits] r6224 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri May 28 07:34:57 EDT 2010


Author: astrid_emde
Date: 2010-05-28 07:34:57 -0400 (Fri, 28 May 2010)
New Revision: 6224

Modified:
   trunk/mapbender/http/plugins/mb_print.js
Log:
change printbox dependent oin selected index

Modified: trunk/mapbender/http/plugins/mb_print.js
===================================================================
--- trunk/mapbender/http/plugins/mb_print.js	2010-05-28 09:04:44 UTC (rev 6223)
+++ trunk/mapbender/http/plugins/mb_print.js	2010-05-28 11:34:57 UTC (rev 6224)
@@ -464,13 +464,17 @@
 	var buildConfigSelector = function () {
 		var str = "";
 		str += '<label class="print_label" for="printPDF_template">Vorlage</label>\n';
-		str += '<select id="printPDF_template" name="printPDF_template" size="1" onchange="printObj.loadConfig(mbPrintConfigFilenames[this.selectedIndex], function () {printObj.createPrintBox()});">\n';
+		str += '<select id="printPDF_template" name="printPDF_template" size="1">\n';
 		for (var i = 0; i < mbPrintConfigFilenames.length; i++) {
 			str += '<option value="'+mbPrintConfigFilenames[i]+'">'+mbPrintConfigTitles[i]+'</option>\n';
 		}
 		str += '</select><img id="printPDF_handle" src="../print/img/shape_handles.png" title="Use printbox">\n';
 		if (str) {
-			$("#printPDF_selector").append(str);
+			$("#printPDF_selector").append(str).find("#printPDF_template").change(function () {
+				printObj.loadConfig(mbPrintConfigFilenames[this.selectedIndex], function () {
+					printObj.createPrintBox()
+				});			
+			});
 			$("#printPDF_handle").click(function () {
 				printObj.createPrintBox();
 			});



More information about the Mapbender_commits mailing list