Permalink
Browse files

The filter & stickyheader widgets cooperate

  • Loading branch information...
1 parent 16c2108 commit 9b6f38a830daf21f931ce329f03a09b5fe92735f @Mottie committed Dec 6, 2011
Showing with 18 additions and 3 deletions.
  1. +4 −0 README.markdown
  2. +5 −0 changelog.txt
  3. +8 −2 js/jquery.tablesorter.widgets.js
  4. +1 −1 js/jquery.tablesorter.widgets.min.js
View
@@ -34,6 +34,10 @@ Included all original [document pages](http://mottie.github.com/tablesorter/docs
View the [complete listing here](http://mottie.github.com/tablesorter/changelog.txt).
+####Version 2.0.23.5 (2011-12-6)
+
+* Updated the sticky header widget again to not interfere with the filter widget. Fix for [issue #10](https://github.com/Mottie/tablesorter/issues/10).
+
####Version 2.0.23.4 (2011-12-6)
* Updated the sticky header widget to reposition the sticky header when scrolling left. Fix for [issue #9](https://github.com/Mottie/tablesorter/issues/9).
View
@@ -1,5 +1,10 @@
TableSorter Change Log
+Version 2.0.23.5 (2011-12-6)
+============================
+
+* Updated the sticky header widget again to not interfere with the filter widget. Fix for [issue #10](https://github.com/Mottie/tablesorter/issues/10).
+
Version 2.0.23.4 (2011-12-6)
============================
@@ -159,7 +159,7 @@ $.tablesorter.addWidget({
header = $(table).find('thead'),
hdrCells = header.find('tr').children(),
brdr = parseInt(hdrCells.eq(0).css('border-left-width'),10),
- sticky = header.find('tr').clone()
+ sticky = header.find('tr:not(.filters)').clone()
.addClass('stickyHeader')
.css({
width : header.outerWidth() + brdr * 2,
@@ -169,7 +169,8 @@ $.tablesorter.addWidget({
visibility : 'hidden',
zIndex : 10
}),
- stkyCells = sticky.children();
+ stkyCells = sticky.children(),
+ laststate;
// update sticky header class names to match real header
$table.bind('sortEnd', function(e,t){
var th = $(t).find('thead tr'),
@@ -205,6 +206,11 @@ $.tablesorter.addWidget({
left : offset.left - win.scrollLeft(),
visibility : vis
});
+ if (vis !== laststate) {
+ // trigger resize to make sure the column widths match
+ win.resize();
+ laststate = vis;
+ }
})
.resize(function(){
sticky.css({

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 9b6f38a

Please sign in to comment.