mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: while detecting parsers, use cssIngoreRow; stop after 50 rows
This commit is contained in:
parent
a85a2a5a66
commit
06faff7764
@ -735,20 +735,24 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
detectParserForColumn : function( c, rows, rowIndex, cellIndex ) {
|
detectParserForColumn : function( c, rows, rowIndex, cellIndex ) {
|
||||||
var cur, $node,
|
var cur, $node, row,
|
||||||
indx = ts.parsers.length,
|
indx = ts.parsers.length,
|
||||||
node = false,
|
node = false,
|
||||||
nodeValue = '',
|
nodeValue = '',
|
||||||
keepLooking = true;
|
keepLooking = true;
|
||||||
while ( nodeValue === '' && keepLooking ) {
|
while ( nodeValue === '' && keepLooking ) {
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
if ( rows[ rowIndex ] ) {
|
row = rows[ rowIndex ];
|
||||||
node = rows[ rowIndex ].cells[ cellIndex ];
|
// stop looking after 50 empty rows
|
||||||
nodeValue = ts.getElementText( c, node, cellIndex );
|
if ( row && rowIndex < 50 ) {
|
||||||
$node = $( node );
|
if ( row.className.indexOf( ts.cssIgnoreRow ) < 0 ) {
|
||||||
if ( c.debug ) {
|
node = rows[ rowIndex ].cells[ cellIndex ];
|
||||||
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
nodeValue = ts.getElementText( c, node, cellIndex );
|
||||||
cellIndex + ': "' + nodeValue + '"' );
|
$node = $( node );
|
||||||
|
if ( c.debug ) {
|
||||||
|
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
||||||
|
cellIndex + ': "' + nodeValue + '"' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
keepLooking = false;
|
keepLooking = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user