pager now targets correct page when the table is empty

This commit is contained in:
Mottie 2013-02-20 01:17:27 -06:00
parent c3089d6ceb
commit 220f1c580c
8 changed files with 16 additions and 11 deletions

View File

@ -42,6 +42,11 @@ tablesorter can successfully parse and sort many types of data including linked
View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Change).
#### Version 2.7.9 (2/20/2013)
* Fixed an issue with the pager targetting an incorrect page when the table starts out empty.
* Get the correct number of columns when `widthFixed` is `true` and the first row contains a table. See [issue #238](https://github.com/Mottie/tablesorter/issues/238).
#### Version 2.7.8 (2/17/2013)
* Fixed script errors:

View File

@ -1,6 +1,6 @@
/*!
* tablesorter pager plugin
* updated 2/17/2013
* updated 2/20/2013
*/
/*jshint browser:true, jquery:true, unused:false */
;(function($) {
@ -358,7 +358,7 @@
if ( c.isDisabled ) { return; }
var p = Math.min( c.totalPages, c.filteredPages );
if ( c.page < 0 ) { c.page = 0; }
if ( c.page > ( p - 1 ) ) { c.page = p - 1; }
if ( c.page > ( p - 1 ) && p !== 0 ) { c.page = p - 1; }
if (c.ajax) {
getAjax(table, c);
} else if (!c.ajax) {

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "tablesorter",
"version": "2.7.8",
"version": "2.7.9",
"dependencies": {
"jqueryjs": ">=1.2.6"
}

View File

@ -1,5 +1,5 @@
/*!
* TableSorter 2.7.8 - Client-side table sorting with ease!
* TableSorter 2.7.9 - Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
* Copyright (c) 2007 Christian Bach
@ -24,7 +24,7 @@
var ts = this;
ts.version = "2.7.8";
ts.version = "2.7.9";
ts.parsers = [];
ts.widgets = [];

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.7.8",
"version": "2.7.9",
"description": "tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.\n\nThis forked version adds lots of new enhancements including: alphanumeric sorting, pager callback functons, multiple widgets providing column styling, ui theme application, sticky headers, column filters and resizer, as well as extended documentation with a lot more demos.",
"author": {
"name": "Christian Bach",

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.7.8",
"version": "2.7.9",
"description": "tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.\n\nThis forked version adds lots of new enhancements including: alphanumeric sorting, pager callback functons, multiple widgets providing column styling, ui theme application, sticky headers, column filters and resizer, as well as extended documentation with a lot more demos.",
"author": {
"name": "Christian Bach",