mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Fixed NaN pager size when cssPageSize is not set.
Fixed manual page setting on construct.
This commit is contained in:
parent
c967fac099
commit
9a81c756f7
@ -136,7 +136,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
hideRowsSetup = function(table, c){
|
hideRowsSetup = function(table, c){
|
||||||
c.size = parseInt($(c.cssPageSize, c.container).val(), 10);
|
c.size = parseInt($(c.cssPageSize, c.container).val(), 10) || c.size;
|
||||||
$.data(table, 'pagerLastSize', c.size);
|
$.data(table, 'pagerLastSize', c.size);
|
||||||
pagerArrows(c);
|
pagerArrows(c);
|
||||||
if (!c.removeRows) {
|
if (!c.removeRows) {
|
||||||
@ -328,8 +328,8 @@
|
|||||||
enablePager = function(table, c, triggered){
|
enablePager = function(table, c, triggered){
|
||||||
var p = $(c.cssPageSize, c.container).removeClass(c.cssDisabled).removeAttr('disabled');
|
var p = $(c.cssPageSize, c.container).removeClass(c.cssDisabled).removeAttr('disabled');
|
||||||
c.isDisabled = false;
|
c.isDisabled = false;
|
||||||
c.page = $.data(table, 'pagerLastPage') || 0;
|
c.page = $.data(table, 'pagerLastPage') || 0 || c.page;
|
||||||
c.size = $.data(table, 'pagerLastSize') || parseInt(p.val(), 10);
|
c.size = $.data(table, 'pagerLastSize') || parseInt(p.val(), 10) || c.size;
|
||||||
c.totalPages = Math.ceil(c.totalRows / c.size);
|
c.totalPages = Math.ceil(c.totalRows / c.size);
|
||||||
if (triggered) {
|
if (triggered) {
|
||||||
$('table').trigger('update');
|
$('table').trigger('update');
|
||||||
|
Loading…
Reference in New Issue
Block a user