Fixed minor issue where an empty query could continue to persist.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@116 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-14 05:14:36 +00:00
parent 2143960ce9
commit ddf4d5cb29

View File

@@ -184,6 +184,16 @@ function gridRestore() {
function gridFilter(id) { function gridFilter(id) {
var field = jQuery("#"+id).attr('name'); var field = jQuery("#"+id).attr('name');
var value = jQuery("#"+id).val(); var value = jQuery("#"+id).val();
// Make sure we're not issuing blank queries.
// It will work without observable effect, but
// it will result in slower queries. Just
// clear out all filter terms instead.
if (value == '') {
gridRestore();
return;
}
/* $('#debug').append("RELOAD: field:"+field+"; value:"+value+"<BR>"); */ /* $('#debug').append("RELOAD: field:"+field+"; value:"+value+"<BR>"); */
jQuery('#<?php echo $gridId; ?>').setPostDataItem('filt', true); jQuery('#<?php echo $gridId; ?>').setPostDataItem('filt', true);
jQuery('#<?php echo $gridId; ?>').setPostDataItem('filtField', field); jQuery('#<?php echo $gridId; ?>').setPostDataItem('filtField', field);