diff --git a/README.markdown b/README.markdown index 7ac8d42f..f752e89a 100644 --- a/README.markdown +++ b/README.markdown @@ -42,6 +42,7 @@ View the [complete listing here](http://mottie.github.com/tablesorter/changelog. * The `sortInitialOrder` will work in either the main options or specifically within the headers option when a particular column needs a different initial sort order. * Added a [sortReset/sortRestart](http://mottie.github.com/tablesorter/docs/example-option-sortreset-sortrestart.html) demo. * Resolves [issue #30](https://github.com/Mottie/tablesorter/issues/29). +* Updated pager plugin to better work with the sticky header widget. #### Version 2.1 (3/7/2012) diff --git a/addons/pager/jquery.tablesorter.pager.css b/addons/pager/jquery.tablesorter.pager.css index 3914697b..38a715e2 100644 --- a/addons/pager/jquery.tablesorter.pager.css +++ b/addons/pager/jquery.tablesorter.pager.css @@ -24,4 +24,15 @@ div.tablesorterPager input { background: rgba(255,255,255,0.8) url(icons/loading.gif) center center no-repeat; position: absolute; z-index: 1000; +} +/*** css used when "updateArrows" option is true ***/ +/* the pager itself gets a disabled class when the number of rows is less than the size */ +.pager.disabled { + display: none; +} +/* hide or fade out pager arrows when the first or last row is visible */ +.pager img.disabled { + /* visibility: hidden */ + opacity: 0.5; + filter: alpha(opacity=50); } \ No newline at end of file diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 44cf3bd1..3971cd3c 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -1,6 +1,6 @@ /* * tablesorter pager plugin - * updated 3/7/2012 + * updated 3/8/2012 */ (function($) { @@ -149,7 +149,9 @@ // process data if (typeof(c.ajaxProcessing) === "function") { var result = c.ajaxProcessing(data), d = result[0], l = d.length, - i, k, th = [], tds = '', tf = ''; + i, k, th = [], tds = '', tf = '', hsh = $(table).addClass('hasStickyHeaders'), + sh = '.' + ((table.config.widgetOptions && table.config.widgetOptions.stickyHeaders) || 'tablesorter-stickyheader'), + $sh = $t.find(sh); for ( i=0; i < l; i++ ) { tds += '