From 4550cc88bfcb87551219a2800d7dd57e15ba6686 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 1 May 2014 11:44:47 +0100 Subject: [PATCH] Fix: Sorting disabled class wasn't being added to the header cells when sorting is completely disabled --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 437f04f8..2bd62a0b 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -9b187f5327f95ae6eaa21ac9d2f2f2a9e3c91b21 +a1f0ee20f181b06bdb5a151830e46cd695d73f52 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index c220f7f5..3b0522bc 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -582,12 +582,11 @@ { var oCol = oSettings.aoColumns[ iCol ]; var oClasses = oSettings.oClasses; + var th = $(oCol.nTh); // Try to get width information from the DOM. We can't get it from CSS // as we'd need to parse the CSS stylesheet. `width` option can override if ( ! oCol.sWidthOrig ) { - var th = $(oCol.nTh); - // Width attribute oCol.sWidthOrig = th.attr('width') || null; @@ -665,6 +664,7 @@ if ( !oSettings.oFeatures.bSort ) { oCol.bSortable = false; + th.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called } /* Check that the class assignment is correct for sorting */