1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

Dev fix: Sort indicator items weren't being redrawn

- Confusion aorund the `order` and `sort` events which resulted in the
  sort icons not being updated
This commit is contained in:
Allan Jardine 2013-11-21 13:46:17 +00:00
parent 7a32f2db93
commit 4549646891
2 changed files with 4 additions and 5 deletions

View File

@ -1 +1 @@
7e07090066442c9e1b4bcbaf9c2b566f7af974fe 7d8d52c60c66a7a672833810278db0d19ebd3ad9

View File

@ -4266,7 +4266,6 @@
/* Tell the draw function that we have sorted the data */ /* Tell the draw function that we have sorted the data */
oSettings.bSorted = true; oSettings.bSorted = true;
_fnCallbackFire( oSettings, null, 'order', [oSettings] );
} }
@ -6072,7 +6071,7 @@
sortedColumns[ val.col ] = val.dir; sortedColumns[ val.col ] = val.dir;
} ); } );
_fnCallbackFire( oSettings, null, 'sort', [oSettings, aSort, sortedColumns] ); _fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );
_fnSortingClasses( oSettings ); _fnSortingClasses( oSettings );
_fnSortAria( oSettings ); _fnSortAria( oSettings );
} }
@ -13649,7 +13648,7 @@
// No additional mark-up required // No additional mark-up required
// Attach a sort listener to update on sort // Attach a sort listener to update on sort
$(settings.nTable).on( 'sort', function ( e, settings, sorting, columns ) { $(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) {
cell cell
.removeClass( .removeClass(
column.sSortingClass +' '+ column.sSortingClass +' '+
@ -13674,7 +13673,7 @@
.appendTo( cell ); .appendTo( cell );
// Attach a sort listener to update on sort // Attach a sort listener to update on sort
$(settings.nTable).on( 'sort', function ( e, settings, sorting, columns ) { $(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) {
cell cell
.removeClass( classes.sSortAsc +" "+classes.sSortDesc ) .removeClass( classes.sSortAsc +" "+classes.sSortDesc )
.addClass( columns[ idx ] == 'asc' ? .addClass( columns[ idx ] == 'asc' ?