[Mapbender-commits] r4418 - branches/mifan_dev/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Jul 26 02:48:03 EDT 2009


Author: mifan
Date: 2009-07-26 02:48:02 -0400 (Sun, 26 Jul 2009)
New Revision: 4418

Modified:
   branches/mifan_dev/mapbender/http/javascripts/mod_searchCSW_ajax.php
Log:
simple vs advanced search

Modified: branches/mifan_dev/mapbender/http/javascripts/mod_searchCSW_ajax.php
===================================================================
--- branches/mifan_dev/mapbender/http/javascripts/mod_searchCSW_ajax.php	2009-07-26 06:13:13 UTC (rev 4417)
+++ branches/mifan_dev/mapbender/http/javascripts/mod_searchCSW_ajax.php	2009-07-26 06:48:02 UTC (rev 4418)
@@ -64,10 +64,26 @@
 	}
 
 	var global_source = 'capabilities';  // [capabilities,db]
+	var global_is_advanced = false;
 
 	//set server side URL
 	var phpUrl        = '../php/mod_addWMSfromfilteredList_server.php?<?php echo $urlParameters;?>';
 
+
+	//Build CSW query and search
+	function mod_searchCSW(){
+		var simplesearchterm = document.getElementById('basic_search').value;
+		
+		//check for simple or advanced
+		if(global_is_advanced){
+			//handle advanced search
+		}
+		else{
+			//handle simple search
+		}	
+		
+		alert (simplesearchterm);
+	}
 	// Load service
 
 	function mod_addWMSfromDB(gui_id,wms_id) {
@@ -297,9 +313,11 @@
 	}
 
 	function hide_advanced_form(){
+
+		global_is_advanced = false;
 		var html='';
 		html = html + "<fieldset>";
-		html = html + "<input type='button' id='adv_search_show' name='adv_search_show' value='<?php echo _mb('++ Advanced'); ?>' onclick='show_advanced_form();' />";
+		html = html + "<input type='button' id='adv_search_show' name='adv_search_show' value='<?php echo _mb('+ Advanced'); ?>' onclick='show_advanced_form();' />";
 		html = html + "</fieldset>";
 
 		document.getElementById('advanced_div').innerHTML=html;
@@ -307,6 +325,7 @@
 
 	function show_advanced_form(){
 		
+		global_is_advanced = true;
 		var html = '';
 		html = html + "<fieldset>";
 		html = html + "<input type='button' value='--Advanced' onclick=hide_advanced_form() />";
@@ -429,7 +448,7 @@
 		</div>
 		
 		
-		<input type="button" id="basic_search_submit" name="addCapURL" value="<?php echo _mb("Search CSW"); ?>" onclick="mod_searchCSWSimple();" />
+		<input type="button" id="basic_search_submit" name="addCapURL" value="<?php echo _mb("Search CSW"); ?>" onclick="mod_searchCSW();" />
 </form>
 </div>
 



More information about the Mapbender_commits mailing list