Core: jQuery filter element parameter not defined in v1.2.6

This commit is contained in:
Rob Garrison 2015-11-04 12:35:57 -06:00
parent 236d633922
commit d8d5908d41

View File

@ -1019,12 +1019,13 @@
if ( list[ indx ][ 1 ] !== 2 ) { if ( list[ indx ][ 1 ] !== 2 ) {
// multicolumn sorting updating - see #1005 // multicolumn sorting updating - see #1005
// .not(function(){}) needs jQuery 1.4 // .not(function(){}) needs jQuery 1.4
$sorted = c.$headers.filter( function( i, el ) { // filter(function(i, el){}) <- el is undefined in jQuery v1.2.6
$sorted = c.$headers.filter( function( i ) {
// only include headers that are in the sortList (this includes colspans) // only include headers that are in the sortList (this includes colspans)
var include = true, var include = true,
$el = $( el ), $el = c.$headers.eq( i ),
col = parseInt( $el.attr( 'data-column' ), 10 ), col = parseInt( $el.attr( 'data-column' ), 10 ),
end = col + el.colSpan; end = col + c.$headers[ i ].colSpan;
for ( ; col < end; col++ ) { for ( ; col < end; col++ ) {
include = include ? ts.isValueInArray( col, c.sortList ) > -1 : false; include = include ? ts.isValueInArray( col, c.sortList ) > -1 : false;
} }