diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 0c8b6280..69d7220a 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -4500,7 +4500,7 @@ * Purpose: Set the sortting classes on the header * Returns: - * Inputs: object:oSettings - dataTables settings object - * Notes: It is safe to call this function when bSort is false + * Notes: It is safe to call this function when bSort and bSortClasses are false */ function _fnSortingClasses( oSettings ) { @@ -6660,6 +6660,11 @@ } } } + + /* Do a first pass on the sorting classes (allows any size changes to be taken into + * account, and also will apply sorting disabled classes if disabled + */ + _fnSortingClasses( oSettings ); /* * Final init diff --git a/media/unit_testing/tests_onhold/1_dom/bSort.js b/media/unit_testing/tests_onhold/1_dom/bSort.js index 6ca81167..ecaf168e 100755 --- a/media/unit_testing/tests_onhold/1_dom/bSort.js +++ b/media/unit_testing/tests_onhold/1_dom/bSort.js @@ -65,6 +65,12 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "4"; } ); + oTest.fnTest( + "Disabled classes applied", + null, + function () { return $('#example thead th:eq(0)').hasClass('sorting_disabled'); } + ); + oTest.fnTest( "Click on second column has no effect", function () { $('#example thead th:eq(1)').click(); },