diff --git a/css/theme.bootstrap.css b/css/theme.bootstrap.css index acae1b83..cab2b0d1 100644 --- a/css/theme.bootstrap.css +++ b/css/theme.bootstrap.css @@ -5,7 +5,8 @@ .tablesorter-bootstrap { width: 100%; } -.tablesorter-bootstrap .tablesorter-header, +.tablesorter-bootstrap thead th, +.tablesorter-bootstrap thead td, .tablesorter-bootstrap tfoot th, .tablesorter-bootstrap tfoot td { font: bold 14px/20px Arial, Sans-serif; diff --git a/css/theme.jui.css b/css/theme.jui.css index f15eb9ae..ea33277d 100644 --- a/css/theme.jui.css +++ b/css/theme.jui.css @@ -12,8 +12,10 @@ } /* header */ -.tablesorter-jui th, -.tablesorter-jui thead td { +.tablesorter-jui thead th, +.tablesorter-jui thead td, +.tablesorter-jui tfoot th, +.tablesorter-jui tfoot td { position: relative; background-repeat: no-repeat; background-position: right center; @@ -21,12 +23,12 @@ font-weight: bold !important; border-width: 1px !important; text-align: left; + padding: 8px; /* wider than the icon */ } .tablesorter-jui .header, .tablesorter-jui .tablesorter-header { cursor: pointer; white-space: normal; - padding: 8px; /* wider than the icon */ } .tablesorter-jui .tablesorter-header-inner { padding-right: 20px; diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 7a9bdd66..4a8c1a60 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1165,6 +1165,11 @@ $h = $t.find('thead:first'), $r = $h.find('tr.' + ts.css.headerRow).removeClass(ts.css.headerRow + ' ' + c.cssHeaderRow), $f = $t.find('tfoot:first > tr').children('th, td'); + if (removeClasses === false && $.inArray('uitheme', c.widgets) >= 0) { + // reapply uitheme classes, in case we want to maintain appearance + $t.trigger('applyWidgetId', ['uitheme']); + $t.trigger('applyWidgetId', ['zebra']); + } // remove widget added rows, just in case $h.find('tr').not($r).remove(); // disable tablesorter @@ -1173,12 +1178,12 @@ .unbind('sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd '.split(' ').join(c.namespace + ' ')); c.$headers.add($f) .removeClass( [ts.css.header, c.cssHeader, c.cssAsc, c.cssDesc, ts.css.sortAsc, ts.css.sortDesc, ts.css.sortNone].join(' ') ) - .removeAttr('data-column'); + .removeAttr('data-column') + .removeAttr('aria-label') + .attr('aria-disabled', 'true'); $r.find(c.selectorSort).unbind('mousedown mouseup keypress '.split(' ').join(c.namespace + ' ')); ts.restoreHeaders(table); - if (removeClasses !== false) { - $t.removeClass(ts.css.table + ' ' + c.tableClass + ' tablesorter-' + c.theme); - } + $t.toggleClass(ts.css.table + ' ' + c.tableClass + ' tablesorter-' + c.theme, removeClasses === false); // clear flag in case the plugin is initialized again table.hasInitialized = false; if (typeof callback === 'function') {