diff --git a/.datatables-commit-sync b/.datatables-commit-sync index e24ecc16..f33f5729 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -a2dd5b40d76ce4522b126827c725fdf5fd3d608a +953038e785e37682aa9fdb4e24402968615d5b4c diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 9d45674b..f1d652f0 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -4098,7 +4098,35 @@ aiOrig = [], aoColumns = settings.aoColumns, aDataSort, iCol, sType, - nestedSort = settings.aaSortingFixed.concat( settings.aaSorting ); + fixed = settings.aaSortingFixed, + fixedObj = $.isPlainObject( fixed ), + nestedSort = [], + add = function ( a ) { + if ( a.length && ! $.isArray( a[0] ) ) { + // 1D array + nestedSort.push( a ); + } + else { + // 2D array + nestedSort.push.apply( nestedSort, a ); + } + }; + + // Build the sort array, with pre-fix and post-fix options if they have been + // specified + if ( $.isArray( fixed ) ) { + add( fixed ); + } + + if ( fixedObj && fixed.pre ) { + add( fixed.pre ); + } + + add( settings.aaSorting ); + + if (fixedObj && fixed.post ) { + add( fixed.post ); + } for ( i=0 ; i