mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Filter: clean up parseFilter function
This commit is contained in:
parent
159a72501c
commit
dcf4b01edf
@ -132,7 +132,7 @@ ts.filter = {
|
|||||||
savedSearch = query;
|
savedSearch = query;
|
||||||
// parse filter value in case we're comparing numbers (dates)
|
// parse filter value in case we're comparing numbers (dates)
|
||||||
if (parsed || parser.type === 'numeric') {
|
if (parsed || parser.type === 'numeric') {
|
||||||
result = ts.filter.parseFilter(c, $.trim('' + data.iFilter.replace(ts.filter.regex.operators, '')), index, parsed, true);
|
result = ts.filter.parseFilter(c, $.trim('' + data.iFilter.replace(ts.filter.regex.operators, '')), index, true);
|
||||||
query = ( typeof result === "number" && result !== '' && !isNaN(result) ) ? result : query;
|
query = ( typeof result === "number" && result !== '' && !isNaN(result) ) ? result : query;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,10 +502,8 @@ ts.filter = {
|
|||||||
c.$table.data('lastSearch', filters);
|
c.$table.data('lastSearch', filters);
|
||||||
return filters;
|
return filters;
|
||||||
},
|
},
|
||||||
parseFilter: function(c, filter, column, parsed, forceParse){
|
parseFilter: function( c, filter, column, parsed ) {
|
||||||
return forceParse || parsed ?
|
return parsed ? c.parsers[column].format( filter, c.table, [], column ) : filter;
|
||||||
c.parsers[column].format( filter, c.table, [], column ) :
|
|
||||||
filter;
|
|
||||||
},
|
},
|
||||||
buildRow: function(table, c, wo) {
|
buildRow: function(table, c, wo) {
|
||||||
var col, column, $header, buildSelect, disabled, name, ffxn,
|
var col, column, $header, buildSelect, disabled, name, ffxn,
|
||||||
|
Loading…
Reference in New Issue
Block a user