Project

General

Profile

« Previous | Next » 

Revision 5996

refresh search when the data operator changes (changing the value is less clear...keyup event seems too eager)

View differences:

lib/style/skins/semtools/index.jsp
257 257
	$("#" + $(treeInstance).attr("id") + "Search").val(shortName)
258 258

  
259 259
	// refresh the search results
260
	doSearch($("#searchForm").get(0));
260
	doSearch();
261 261
	
262 262
	// refresh the other trees for active domain after this filtering action
263 263
	initialize($(parent).children("div"));
264 264
}
265
function doSearch(formObj) {
265
function doSearch() {
266

  
267
	// get a reference
268
	var formObj = $("#searchForm").get(0);
269
	
266 270
	// set the hidden parameters based on the current state of the form
267 271
	checkSearch(formObj);
268 272
	
......
416 420
	
417 421
	// reload the search results
418 422
	//alert($('#searchForm').get(0));
419
	doSearch($('#searchForm').get(0));
423
	doSearch();
420 424
}
421 425
function addCurrent() {
422 426

  
......
477 481
		// remove the container (includes the form objects we added)
478 482
		$("#" + containerId).remove();
479 483
		// refresh the search results now that they are less restrictive
480
		doSearch($("#searchForm").get(0));
484
		doSearch();
481 485
	});
482 486

  
483 487
	// clear the form of what we just saved to the criteria list
......
492 496
	clearForm();
493 497

  
494 498
	// refresh the search results now that they are less restrictive
495
	doSearch($("#searchForm").get(0));
499
	doSearch();
496 500
}
497 501
/**
498 502
 * Perform this when the page first loads
499 503
 */
500 504
function pageLoad() {
501 505
	initialize();
502
	doSearch($('#searchForm').get(0));
506
	doSearch();
503 507
	loadCart();
504 508
}
505 509
function donothing() {}
......
535 539
		target="_top" 
536 540
		id="searchForm" 
537 541
		name="searchForm" 
538
		onSubmit="return doSearch(this)">
542
		onSubmit="return doSearch()">
539 543
	<input name="query" type="hidden" />
540 544
	<input name="qformat" value="semtools" type="hidden" />
541 545
	<input name="includeHeader" value="false" type="hidden" />
......
600 604
							<tr>
601 605
								<td>
602 606
									<div id="characteristicData">
603
										<select id="dataOperator" name="dataOperator" class="dataClass">
607
										<select id="dataOperator" name="dataOperator" class="dataClass" onchange="doSearch()">
604 608
											<option value="EQUALS">=</option>
605 609
											<option value="NOT EQUALS">!=</option>
606 610

  
......
702 706
					
703 707
					<td colspan="1">
704 708
						Match All? 
705
						<input type="checkbox" name="matchAll" id="matchAll" checked="checked" onchange="doSearch($('#searchForm').get(0))"/>
709
						<input type="checkbox" name="matchAll" id="matchAll" checked="checked" onchange="doSearch()"/>
706 710
					</td>
707 711
				
708 712
					<td colspan="1">
709 713
						From same Observation? 
710
						<input type="checkbox" name="strict" id="strict" onchange="doSearch($('#searchForm').get(0))"/>
714
						<input type="checkbox" name="strict" id="strict" onchange="doSearch()"/>
711 715
					</td>
712 716
				</tr>
713 717
				

Also available in: Unified diff