[Mapbender-commits] r4776 - branches/2.6/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Oct 15 06:21:53 EDT 2009


Author: verenadiewald
Date: 2009-10-15 06:21:52 -0400 (Thu, 15 Oct 2009)
New Revision: 4776

Modified:
   branches/2.6/http/javascripts/mod_addWMSfromfilteredList_ajax.php
Log:
element vars defined as integer

Modified: branches/2.6/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- branches/2.6/http/javascripts/mod_addWMSfromfilteredList_ajax.php	2009-10-15 10:00:02 UTC (rev 4775)
+++ branches/2.6/http/javascripts/mod_addWMSfromfilteredList_ajax.php	2009-10-15 10:21:52 UTC (rev 4776)
@@ -31,12 +31,15 @@
 	<?php printf("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\" />",CHARSET);	?>
 	<title>Add WMS</title>
 	<script type="text/javascript">
+	<?php
+	include '../include/dyn_js.php';
+	?>
 	<!--
 	// Set default for element variables if they are undefined
-	option_dball      = (typeof(option_dball) !== 'undefined')      ? option_dball      : '1';
-	option_dbgroup    = (typeof(option_dbgroup) !== 'undefined')    ? option_dbgroup    : '0';
-	option_dbgui      = (typeof(option_dbgui) !== 'undefined')      ? option_dbgui      : '0';
-	capabilitiesInput = (typeof(capabilitiesInput) !== 'undefined') ? capabilitiesInput : '1';
+	option_dball      = (typeof(option_dball) !== 'undefined')      ? option_dball      : 1;
+	option_dbgroup    = (typeof(option_dbgroup) !== 'undefined')    ? option_dbgroup    : 0;
+	option_dbgui      = (typeof(option_dbgui) !== 'undefined')      ? option_dbgui      : 0;
+	capabilitiesInput = (typeof(capabilitiesInput) !== 'undefined') ? capabilitiesInput : 1;
 	gui_list          = (typeof(gui_list) !== 'undefined')          ? gui_list          : '';
 
 	var guis = gui_list.split(',');
@@ -201,13 +204,13 @@
 			parseInt(option_dbgroup) + 
 			parseInt(option_dball)
 		=== 1) {
-			if(option_dball === '1'){
+			if(option_dball === 1){
 				optionButton = document.getElementById('button_dbAll');
 			}
-			if(option_dbgroup === '1') {
+			if(option_dbgroup === 1) {
 				optionButton = document.getElementById('button_dbGroup');
 			}
-			if(option_dbgui === '1') {
+			if(option_dbgui === 1) {
 				optionButton = document.getElementById('button_dbGui');
 			}
 
@@ -219,20 +222,20 @@
 			}
 		}
 
-		if(option_dball === '0') {
+		if(option_dball === 0) {
 			optionButton = document.getElementById('button_dbAll');
 			optionButton.parentNode.removeChild(optionButton);
 		}
-		if(option_dbgroup === '0') {
+		if(option_dbgroup === 0) {
 			optionButton = document.getElementById('button_dbGroup');
 			optionButton.parentNode.removeChild(optionButton);
 		}
-		if(option_dbgui === '0') {
+		if(option_dbgui === 0) {
 			optionButton = document.getElementById('button_dbGui');
 			optionButton.parentNode.removeChild(optionButton);
 		}
 		
-		if(capabilitiesInput === '0') {
+		if(capabilitiesInput === 0) {
 			optionButton = document.getElementById('capabilitiesForm');
 			optionButton.parentNode.removeChild(optionButton);
 			containerCapabilities.parentNode.removeChild(containerCapabilities);



More information about the Mapbender_commits mailing list