|
|
@ -44,7 +44,7 @@ $.extend( DataTable.ext.classes, {
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, idx, classes ) {
|
|
|
|
DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, classes ) {
|
|
|
|
$('<div/>')
|
|
|
|
$('<div/>')
|
|
|
|
.addClass( 'DataTables_sort_wrapper' )
|
|
|
|
.addClass( 'DataTables_sort_wrapper' )
|
|
|
|
.append( cell.contents() )
|
|
|
|
.append( cell.contents() )
|
|
|
@ -55,10 +55,12 @@ DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, idx,
|
|
|
|
|
|
|
|
|
|
|
|
// Attach a sort listener to update on sort
|
|
|
|
// Attach a sort listener to update on sort
|
|
|
|
$(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) {
|
|
|
|
$(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) {
|
|
|
|
|
|
|
|
var colIdx = column.idx;
|
|
|
|
|
|
|
|
|
|
|
|
cell
|
|
|
|
cell
|
|
|
|
.removeClass( classes.sSortAsc +" "+classes.sSortDesc )
|
|
|
|
.removeClass( classes.sSortAsc +" "+classes.sSortDesc )
|
|
|
|
.addClass( columns[ idx ] == 'asc' ?
|
|
|
|
.addClass( columns[ colIdx ] == 'asc' ?
|
|
|
|
classes.sSortAsc : columns[ idx ] == 'desc' ?
|
|
|
|
classes.sSortAsc : columns[ colIdx ] == 'desc' ?
|
|
|
|
classes.sSortDesc :
|
|
|
|
classes.sSortDesc :
|
|
|
|
column.sSortingClass
|
|
|
|
column.sSortingClass
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -72,13 +74,13 @@ DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, idx,
|
|
|
|
sort_prefix+'carat-1-n' +" "+
|
|
|
|
sort_prefix+'carat-1-n' +" "+
|
|
|
|
sort_prefix+'carat-1-s'
|
|
|
|
sort_prefix+'carat-1-s'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.addClass( columns[ idx ] == 'asc' ?
|
|
|
|
.addClass( columns[ colIdx ] == 'asc' ?
|
|
|
|
sort_prefix+'triangle-1-n' : columns[ idx ] == 'desc' ?
|
|
|
|
sort_prefix+'triangle-1-n' : columns[ colIdx ] == 'desc' ?
|
|
|
|
sort_prefix+'triangle-1-s' :
|
|
|
|
sort_prefix+'triangle-1-s' :
|
|
|
|
column.sSortingClassJUI
|
|
|
|
column.sSortingClassJUI
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|