1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-20 18:54:15 +01:00

Fix DataTables/DataTables #275 - Sort classes weren't being applied to

newly created elements

- The fix i've put in is basically the same as what DataTables 1.9-
  used. I had tried to opitmise it a little, but it wasn't working for
  newly created cells. I still think this can be optimised, but for the
  moment, this is at least allows it to work.
This commit is contained in:
Allan Jardine 2014-02-19 10:07:21 +00:00
parent 2a83b65a33
commit 7227353a8f
2 changed files with 8 additions and 4 deletions

View File

@ -1 +1 @@
0a10f0a40ff1c6fa3b8d5c8e2e5abab318de88d2
515761905c2c4df2fe5640e371dfb4b397c12523

View File

@ -6095,11 +6095,12 @@
} );
}
var features = oSettings.oFeatures;
/* Must be done after everything which can be overridden by the state saving! */
if ( oInit.bStateSave )
{
oSettings.oFeatures.bStateSave = true;
features.bStateSave = true;
_fnLoadState( oSettings, oInit );
_fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' );
}
@ -6125,7 +6126,7 @@
*/
_fnSortingClasses( oSettings );
if ( oSettings.oFeatures.bSort )
if ( features.bSort )
{
_fnCallbackReg( oSettings, 'aoDrawCallback', function () {
if ( oSettings.bSorted ) {
@ -6137,12 +6138,15 @@
} );
_fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );
_fnSortingClasses( oSettings );
_fnSortAria( oSettings );
}
} );
}
if ( _fnDataSource( oSettings ) === 'ssp' || features.bDeferRender ) {
_fnCallbackReg( oSettings, 'aoDrawCallback', _fnSortingClasses, 'sc' );
}
/*