Skip to content

Commit

Permalink
Pager: Show all rows, not pages. Fixes Mottie#1529
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Mar 19, 2018
1 parent 8b1ba54 commit 4f9cf81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions addons/pager/jquery.tablesorter.pager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* tablesorter (FORK) pager plugin
* updated 2018-03-18 (v2.30.0)
* updated 2018-03-19 (v2.30.1)
*/
/*jshint browser:true, jquery:true, unused:false */
;(function($) {
Expand Down Expand Up @@ -692,12 +692,12 @@
$.data(table, 'pagerLastPage', p.page);
$.data(table, 'pagerLastSize', p.size);
p.page = 0;
p.size = p.totalPages;
p.size = p.totalRows;
p.totalPages = 1;
$(table)
.addClass('pagerDisabled')
.removeAttr('aria-describedby')
.find('tr.pagerSavedHeightSpacer').remove();
.addClass('pagerDisabled')
.removeAttr('aria-describedby')
.find('tr.pagerSavedHeightSpacer').remove();
renderTable(table, table.config.rowsCopy, p);
p.isDisabled = true;
ts.applyWidget( table );
Expand Down
5 changes: 3 additions & 2 deletions js/widgets/widget-pager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Widget: Pager - updated 2018-03-18 (v2.30.0) */
/*! Widget: Pager - updated 2018-03-19 (v2.30.1) */
/* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
Expand Down Expand Up @@ -1020,7 +1020,8 @@
$.data( table, 'pagerLastPage', p.page );
$.data( table, 'pagerLastSize', p.size );
p.page = 0;
p.size = p.totalPages;
p.size = p.totalRows;
console.log(p.totalRows, p.totalPages);
p.totalPages = 1;
c.$table
.addClass( 'pagerDisabled' )
Expand Down

0 comments on commit 4f9cf81

Please sign in to comment.