Core: applyWidget callback occurs after "tablesorter-ready"

This commit is contained in:
Rob Garrison 2017-04-02 06:25:23 -05:00
parent 5e784174ec
commit 196bfd2d11

View File

@ -2056,22 +2056,22 @@
} }
} }
if ( c.debug && console.groupEnd ) { console.groupEnd(); } if ( c.debug && console.groupEnd ) { console.groupEnd(); }
// callback executed on init only
if ( !init && typeof callback === 'function' ) {
callback( table );
}
} }
c.timerReady = setTimeout( function() { c.timerReady = setTimeout( function() {
table.isApplyingWidgets = false; table.isApplyingWidgets = false;
$.data( table, 'lastWidgetApplication', new Date() ); $.data( table, 'lastWidgetApplication', new Date() );
c.$table.triggerHandler( 'tablesorter-ready' ); c.$table.triggerHandler( 'tablesorter-ready' );
}, 10 ); // callback executed on init only
if ( !init && typeof callback === 'function' ) {
callback( table );
}
if ( c.debug ) { if ( c.debug ) {
widget = c.widgets.length; widget = c.widgets.length;
console.log( 'Completed ' + console.log( 'Completed ' +
( init === true ? 'initializing ' : 'applying ' ) + widget + ( init === true ? 'initializing ' : 'applying ' ) + widget +
' widget' + ( widget !== 1 ? 's' : '' ) + ts.benchmark( time ) ); ' widget' + ( widget !== 1 ? 's' : '' ) + ts.benchmark( time ) );
} }
}, 10 );
}, },
removeWidget : function( table, name, refreshing ) { removeWidget : function( table, name, refreshing ) {