[Mapbender-commits] r3709 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Mar 13 11:37:11 EDT 2009
Author: verenadiewald
Date: 2009-03-13 11:37:11 -0400 (Fri, 13 Mar 2009)
New Revision: 3709
Modified:
trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php
Log:
removed some bugs, changed options for adding wms
Modified: trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2009-03-13 15:36:20 UTC (rev 3708)
+++ trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2009-03-13 15:37:11 UTC (rev 3709)
@@ -33,13 +33,10 @@
<script type="text/javascript">
<!--
// Set default for element variables if they are undefined
- option_all = (typeof(option_all) !== 'undefined') ? option_all : '1';
- option_group = (typeof(option_group) !== 'undefined') ? option_group : '1';
- option_gui = (typeof(option_gui) !== 'undefined') ? option_gui : '1';
option_dball = (typeof(option_dball) !== 'undefined') ? option_dball : '1';
- option_dbgroup = (typeof(option_dbgroup) !== 'undefined') ? option_dbgroup : '1';
- option_dbgui = (typeof(option_dbgui) !== 'undefined') ? option_dbgui : '1';
- capabilitiesInput = (typeof(capabilitiesInput) !== 'undefined') ? capabilitiesInput : '0';
+ 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(',');
@@ -159,7 +156,9 @@
tableRow.appendChild(leftTableCell);
tableRow.appendChild(rightTableCell);
- tableRow.setAttribute('onclick',onClick);
+ tableRow.onclick = function () {
+ eval(onClick);
+ }
if(resultTableBoy.childNodes.length % 2 !== 0) {
tableRow.className += tableRow.className + ' alternate';
@@ -198,22 +197,10 @@
// If only one is active load list imidiately
if(
- parseInt(option_all) +
- parseInt(option_group) +
- parseInt(option_gui) +
parseInt(option_dbgui) +
parseInt(option_dbgroup) +
parseInt(option_dball)
=== 1) {
- if(option_all === '1') {
- optionButton = document.getElementById('button_all');
- }
- if(option_group === '1') {
- optionButton = document.getElementById('button_group');
- }
- if(option_gui === '1') {
- optionButton = document.getElementById('button_gui');
- }
if(option_dball === '1'){
optionButton = document.getElementById('button_dbAll');
}
@@ -232,18 +219,6 @@
}
}
- if(typeof(option_all) !== 'undefined' && option_all === '0') {
- optionButton = document.getElementById('button_all');
- optionButton.parentNode.removeChild(optionButton);
- }
- if(typeof(option_group) !== 'undefined' && option_group === '0') {
- optionButton = document.getElementById('button_group');
- optionButton.parentNode.removeChild(optionButton);
- }
- if(typeof(option_gui) !== 'undefined' && option_gui === '0') {
- optionButton = document.getElementById('button_gui');
- optionButton.parentNode.removeChild(optionButton);
- }
if(option_dball === '0') {
optionButton = document.getElementById('button_dbAll');
optionButton.parentNode.removeChild(optionButton);
@@ -359,9 +334,6 @@
<legend>WMS list(s)</legend>
<p>
<label><?php echo _mb("Available WMS list(s)"); ?>:</label>
- <input type="button" name="button_all" id="button_all" value="<?php echo _mb("All WMS"); ?>" onclick="setSource('capabilities');getWMSByGUI(gui_list)">
- <input type="button" name="button_group" id="button_group" value="<?php echo _mb("WMS by Group"); ?>" onclick="setSource('capabilities');getGroups()">
- <input type="button" name="button_gui" id="button_gui" value="<?php echo _mb("WMS by GUI"); ?>" onclick="setSource('capabilities');getGUIs()">
<input type="button" name="button_dbAll" id="button_dbAll" value="<?php echo _mb("Database (All WMS)"); ?>" onclick="setSource('db');getWMSByGUI(gui_list)">
<input type="button" name="button_dbGroup" id="button_dbGroup" value="<?php echo _mb("Database (Group)"); ?>" onclick="setSource('db');getGroups()">
<input type="button" name="button_dbGui" id="button_dbGui" value="<?php echo _mb("Database (GUI)"); ?>" onclick="setSource('db');getGUIs()">
More information about the Mapbender_commits
mailing list