diff --git a/media/src/core/core.sort.js b/media/src/core/core.sort.js index cff09617..c1102a4e 100644 --- a/media/src/core/core.sort.js +++ b/media/src/core/core.sort.js @@ -402,54 +402,50 @@ function _fnSortingClasses( oSettings ) { var nTds = _fnGetTdNodes( oSettings ); - /* Remove the old classes */ - if ( oSettings.oFeatures.bDeferRender || nTds.length >= iColumns ) + /* Determine what the sorting class for each column should be */ + var iClass, iTargetCol; + var asClasses = []; + for (i = 0; i < iColumns; i++) { - var reClass = new RegExp(sClass + "[123]"); - - /* Track columns where we've found one of the sorting classes */ - var abFound = [], iFound = 0; - - for ( i=0, iLen=nTds.length; i 0 && sCurrentClass.indexOf(sNewClass) == -1 ) + { + /* We need to add a class */ + nTds[i].className = sCurrentClass + " " + sNewClass; + } + } } }