From b4a289bf365c6d5196129b4ae168c3ebd591aa76 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Tue, 6 Dec 2011 11:24:35 +0000 Subject: [PATCH] Limit the span modification for the sort classes - from pull request 40 (https://github.com/DataTables/DataTables/pull/40). --- media/js/jquery.dataTables.js | 2 +- media/src/core/core.sort.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index f767eac5..f82f3d9c 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -4005,7 +4005,7 @@ if ( oSettings.bJUI ) { /* jQuery UI uses extra markup */ - var jqSpan = $("span", oSettings.aoColumns[i].nTh); + var jqSpan = $("span."+_oExt.oJUIClasses.sSortIcon, oSettings.aoColumns[i].nTh); jqSpan.removeClass(oClasses.sSortJUIAsc +" "+ oClasses.sSortJUIDesc +" "+ oClasses.sSortJUI +" "+ oClasses.sSortJUIAscAllowed +" "+ oClasses.sSortJUIDescAllowed ); diff --git a/media/src/core/core.sort.js b/media/src/core/core.sort.js index c5ff3168..006bc0ca 100644 --- a/media/src/core/core.sort.js +++ b/media/src/core/core.sort.js @@ -320,7 +320,7 @@ function _fnSortingClasses( oSettings ) if ( oSettings.bJUI ) { /* jQuery UI uses extra markup */ - var jqSpan = $("span", oSettings.aoColumns[i].nTh); + var jqSpan = $("span."+_oExt.oJUIClasses.sSortIcon, oSettings.aoColumns[i].nTh); jqSpan.removeClass(oClasses.sSortJUIAsc +" "+ oClasses.sSortJUIDesc +" "+ oClasses.sSortJUI +" "+ oClasses.sSortJUIAscAllowed +" "+ oClasses.sSortJUIDescAllowed );