mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Filter: parsed flag tweaks
* Set all true if `filter_useParsedData` true. * Stop using c.$headers
This commit is contained in:
parent
4e9905f26c
commit
06b190a520
@ -1176,18 +1176,17 @@
|
||||
};
|
||||
|
||||
// parse columns after formatter, in case the class is added at that point
|
||||
data.parsed = c.$headers.map( function( columnIndex ) {
|
||||
return c.parsers && c.parsers[ columnIndex ] &&
|
||||
// force parsing if parser type is numeric
|
||||
c.parsers[ columnIndex ].parsed ||
|
||||
// getData won't return 'parsed' if other 'filter-' class names exist
|
||||
data.parsed = [];
|
||||
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
||||
data.parsed[ columnIndex ] = wo.filter_useParsedData ||
|
||||
// parser has a "parsed" parameter
|
||||
( c.parsers && c.parsers[ columnIndex ] && c.parsers[ columnIndex ].parsed ||
|
||||
// getData may not return 'parsed' if other 'filter-' class names exist
|
||||
// ( e.g. <th class="filter-select filter-parsed"> )
|
||||
ts.getData && ts.getData( c.$headerIndexed[ columnIndex ],
|
||||
ts.getColumnData( table, c.headers, columnIndex ), 'filter' ) === 'parsed' ||
|
||||
$( this ).hasClass( 'filter-parsed' );
|
||||
}).get();
|
||||
c.$headerIndexed[ columnIndex ].hasClass( 'filter-parsed' ) );
|
||||
|
||||
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
||||
vars.functions[ columnIndex ] =
|
||||
ts.getColumnData( table, wo.filter_functions, columnIndex );
|
||||
vars.defaultColFilter[ columnIndex ] =
|
||||
|
@ -102,7 +102,7 @@ QUnit.extend(QUnit.assert, {
|
||||
});
|
||||
// flatten array
|
||||
flat = flat.concat.apply( flat, result.parsed );
|
||||
QUnit.assert.deepEqual( flat, expected, 'testing parser cache: ' + txt);
|
||||
QUnit.assert.deepEqual( flat, expected, 'Comparing parser cache: ' + txt);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user