tablesorter/addons/pager/jquery.tablesorter.pager.js

483 lines
15 KiB
JavaScript
Raw Normal View History

2012-03-22 14:50:17 +00:00
/*!
2011-07-27 06:14:20 +00:00
* tablesorter pager plugin
2012-10-13 20:10:29 +00:00
* updated 10/13/2012
2011-07-27 06:14:20 +00:00
*/
2012-09-27 19:57:19 +00:00
/*jshint browser:true, jquery:true */
2012-04-29 02:45:34 +00:00
;(function($) {
2012-09-27 19:57:19 +00:00
"use strict";
2011-07-17 15:01:18 +00:00
$.extend({tablesorterPager: new function() {
2012-03-07 17:59:39 +00:00
this.defaults = {
// target the pager markup
container: null,
// use this format: "http:/mydatabase.com?page={page}&size={size}"
// where {page} is replaced by the page number and {size} is replaced by the number of records to show
ajaxUrl: null,
// process ajax so that the following information is returned:
// [ total_rows (number), rows (array of arrays), headers (array; optional) ]
// example:
// [
// 100, // total rows
// [
// [ "row1cell1", "row1cell2", ... "row1cellN" ],
// [ "row2cell1", "row2cell2", ... "row2cellN" ],
// ...
// [ "rowNcell1", "rowNcell2", ... "rowNcellN" ]
// ],
// [ "header1", "header2", ... "headerN" ] // optional
// ]
ajaxProcessing: function(ajax){ return [ 0, [], null ]; },
2012-03-07 17:59:39 +00:00
// output default: '{page}/{totalPages}'
2012-09-27 19:57:19 +00:00
// possible variables: {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows}
2012-03-07 17:59:39 +00:00
output: '{startRow} to {endRow} of {totalRows} rows', // '{page}/{totalPages}'
// apply disabled classname to the pager arrows when the rows at either extreme is visible
updateArrows: true,
// starting page of the pager (zero based index)
page: 0,
// Number of visible rows
size: 10,
// if true, the table will remain the same height no matter how many records are displayed. The space is made up by an empty
// table row set to a height to compensate; default is false
fixedHeight: false,
// remove rows from the table to speed up the sort of large tables.
// setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled.
2012-09-27 19:57:19 +00:00
removeRows: false, // removing rows in larger tables speeds up the sort
2012-03-07 17:59:39 +00:00
// css class names of pager arrows
2012-09-27 19:57:19 +00:00
cssFirst: '.first', // go to first page arrow
2012-03-07 17:59:39 +00:00
cssPrev: '.prev', // previous page arrow
2012-09-27 19:57:19 +00:00
cssNext: '.next', // next page arrow
cssLast: '.last', // go to last page arrow
cssGoto: '.gotoPage', // go to page selector - select dropdown that sets the current page
2012-03-07 17:59:39 +00:00
cssPageDisplay: '.pagedisplay', // location of where the "output" is displayed
cssPageSize: '.pagesize', // page size selector - select dropdown that sets the "size" option
// class added to arrows when at the extremes (i.e. prev/first arrows are "disabled" when on the first page)
cssDisabled: 'disabled', // Note there is no period "." in front of this class name
// stuff not set by the user
totalRows: 0,
2012-09-27 19:57:19 +00:00
totalPages: 0,
filteredRows: 0,
filteredPages : 0
2012-03-07 17:59:39 +00:00
};
var $this = this,
2011-09-08 16:28:10 +00:00
// hide arrows at extremes
2012-03-07 17:59:39 +00:00
pagerArrows = function(c, disable) {
2012-09-27 19:57:19 +00:00
var a = 'addClass',
r = 'removeClass',
d = c.cssDisabled,
dis = !!disable,
// tr = Math.min( c.totalRows, c.filteredRows ),
tp = Math.min( c.totalPages, c.filteredPages );
if ( c.updateArrows ) {
$(c.cssFirst + ',' + c.cssPrev, c.container)[ ( dis || c.page === 0 ) ? a : r ](d);
$(c.cssNext + ',' + c.cssLast, c.container)[ ( dis || c.page === tp - 1 ) ? a : r ](d);
2011-09-08 16:28:10 +00:00
}
},
2011-10-14 01:57:46 +00:00
updatePageDisplay = function(table, c) {
2012-09-27 19:57:19 +00:00
var i, p, s, t, out, f = $(table).hasClass('hasFilters');
c.filteredRows = (f) ? $(table).find('tbody tr:not(.filtered)').length : c.totalRows;
c.filteredPages = (f) ? Math.ceil( c.filteredRows / c.size ) : c.totalPages;
if ( Math.min( c.totalPages, c.filteredPages ) > 0 ) {
t = (c.size * c.page > c.filteredRows);
c.startRow = (t) ? 1 : ( c.size * c.page ) + 1;
c.page = (t) ? 0 : c.page;
c.endRow = Math.min( c.filteredRows, c.totalRows, c.size * ( c.page + 1 ) );
out = $(c.cssPageDisplay, c.container);
// form the output string
2012-09-27 19:57:19 +00:00
s = c.output.replace(/\{(page|filteredRows|filteredPages|totalPages|startRow|endRow|totalRows)\}/gi, function(m){
return {
2012-09-27 19:57:19 +00:00
'{page}' : c.page + 1,
'{filteredRows}' : c.filteredRows,
'{filteredPages}' : c.filteredPages,
'{totalPages}' : c.totalPages,
'{startRow}' : c.startRow,
'{endRow}' : c.endRow,
'{totalRows}' : c.totalRows
}[m];
});
if (out[0]) {
out[ (out[0].tagName === 'INPUT') ? 'val' : 'html' ](s);
2012-09-27 19:57:19 +00:00
if ( $(c.cssGoto, c.container).length ) {
t = '';
p = Math.min( c.totalPages, c.filteredPages );
for ( i = 1; i <= p; i++ ) {
t += '<option>' + i + '</option>';
}
$(c.cssGoto, c.container).html(t).val(c.page + 1);
}
}
2011-07-27 06:14:20 +00:00
}
2011-09-08 16:28:10 +00:00
pagerArrows(c);
2011-07-17 15:01:18 +00:00
$(table).trigger('pagerComplete', c);
},
2012-03-07 17:59:39 +00:00
fixHeight = function(table, c) {
var d, h, $b = $(table.tBodies[0]);
if (c.fixedHeight) {
$b.find('tr.pagerSavedHeightSpacer').remove();
h = $.data(table, 'pagerSavedHeight');
if (h) {
d = h - $b.height();
2012-09-27 19:57:19 +00:00
if ( d > 5 && $.data(table, 'pagerLastSize') === c.size && $b.find('tr:visible').length < c.size ) {
2012-03-07 17:59:39 +00:00
$b.append('<tr class="pagerSavedHeightSpacer remove-me" style="height:' + d + 'px;"></tr>');
}
2011-07-17 15:01:18 +00:00
}
2011-06-22 23:19:27 +00:00
}
2011-07-17 15:01:18 +00:00
},
2012-03-07 17:59:39 +00:00
changeHeight = function(table, c) {
var $b = $(table.tBodies[0]);
$b.find('tr.pagerSavedHeightSpacer').remove();
$.data(table, 'pagerSavedHeight', $b.height());
fixHeight(table, c);
$.data(table, 'pagerLastSize', c.size);
},
2011-09-22 22:32:58 +00:00
hideRows = function(table, c){
2012-10-13 19:41:34 +00:00
if (!c.ajaxUrl) {
var i,
rows = $('tr:not(.' + table.config.cssChildRow + ')', table.tBodies),
l = rows.length,
s = ( c.page * c.size ),
e = s + c.size,
j = 0; // size counter
for ( i = 0; i < l; i++ ){
if (!/filtered/.test(rows[i].className)) {
rows[i].style.display = ( j >= s && j < e ) ? '' : 'none';
j++;
}
2012-09-27 19:57:19 +00:00
}
2011-09-22 22:32:58 +00:00
}
},
2011-10-14 01:57:46 +00:00
hideRowsSetup = function(table, c){
2012-09-27 19:57:19 +00:00
c.size = parseInt( $(c.cssPageSize, c.container).val(), 10 ) || c.size;
2012-03-07 17:59:39 +00:00
$.data(table, 'pagerLastSize', c.size);
2011-10-14 01:57:46 +00:00
pagerArrows(c);
2012-09-27 19:57:19 +00:00
if ( !c.removeRows ) {
2011-10-14 01:57:46 +00:00
hideRows(table, c);
2012-09-27 19:57:19 +00:00
$(table).bind('sortEnd.pager filterEnd.pager', function(){
2011-10-14 01:57:46 +00:00
hideRows(table, c);
});
}
},
renderAjax = function(data, table, c, exception){
// process data
2012-09-27 19:57:19 +00:00
if ( typeof(c.ajaxProcessing) === "function" ) {
// ajaxProcessing result: [ total, rows, headers ]
2012-09-27 19:57:19 +00:00
var i, j, hsh, $f, $sh,
$t = $(table),
2012-10-13 19:41:34 +00:00
tc = table.config,
$b = $(table.tBodies).filter(':not(.' + tc.cssInfoBlock + ')'),
2012-03-22 14:50:17 +00:00
hl = $t.find('thead th').length, tds = '',
2012-10-13 19:41:34 +00:00
err = '<tr class="' + tc.selectorRemove + '"><td style="text-align: center;" colspan="' + hl + '">' +
(exception ? exception.message + ' (' + exception.name + ')' : 'No rows found') + '</td></tr>',
result = c.ajaxProcessing(data) || [ 0, [] ],
2012-09-27 19:57:19 +00:00
d = result[1] || [],
l = d.length,
th = result[2];
if ( l > 0 ) {
for ( i = 0; i < l; i++ ) {
tds += '<tr>';
2012-09-27 19:57:19 +00:00
for ( j = 0; j < d[i].length; j++ ) {
// build tbody cells
tds += '<td>' + d[i][j] + '</td>';
}
tds += '</tr>';
}
}
// only add new header text if the length matches
2012-09-27 19:57:19 +00:00
if ( th && th.length === hl ) {
hsh = $t.hasClass('hasStickyHeaders');
2012-10-13 19:41:34 +00:00
$sh = $t.find('.' + ((tc.widgetOptions && tc.widgetOptions.stickyHeaders) || 'tablesorter-stickyheader'));
2012-03-22 14:50:17 +00:00
$f = $t.find('tfoot tr:first').children();
2012-10-13 19:41:34 +00:00
$t.find('th.' + tc.cssHeader).each(function(j){
var $t = $(this), tar, icn;
// add new test within the first span it finds, or just in the header
2012-10-13 19:41:34 +00:00
if ( $t.find('.' + tc.cssIcon).length ) {
icn = $t.find('.' + tc.cssIcon).clone(true);
$t.find('.tablesorter-header-inner').html( th[j] ).append(icn);
if ( hsh && $sh.length ) {
icn = $sh.find('th').eq(j).find('.' + tc.cssIcon).clone(true);
$sh.find('th').eq(j).find('.tablesorter-header-inner').html( th[j] ).append(icn);
}
} else {
$t.find('.tablesorter-header-inner').html( th[j] );
$sh.find('th').eq(j).find('.tablesorter-header-inner').html( th[j] );
}
2012-09-27 19:57:19 +00:00
$f.eq(j).html( th[j] );
// update sticky headers
2012-09-27 19:57:19 +00:00
if ( hsh && $sh.length ){
tar = $sh.find('th').eq(j);
2012-09-27 19:57:19 +00:00
tar = ( tar.find('span').length ) ? tar.find('span:first') : tar;
tar.html( th[j] );
}
});
}
2012-09-27 19:57:19 +00:00
if ( exception ) {
// add error row to thead instead of tbody, or clicking on the header will result in a parser error
$t.find('thead').append(err);
} else {
2012-09-27 19:57:19 +00:00
$b.html( tds ); // add tbody
}
c.temp.remove(); // remove loading icon
$t.trigger('update');
c.totalRows = result[0] || 0;
2012-09-27 19:57:19 +00:00
c.totalPages = Math.ceil( c.totalRows / c.size );
updatePageDisplay(table, c);
fixHeight(table, c);
$t.trigger('pagerChange', c);
}
},
2012-03-07 17:59:39 +00:00
getAjax = function(table, c){
var $t = $(table),
2012-03-07 17:59:39 +00:00
url = c.ajaxUrl.replace(/\{page\}/g, c.page).replace(/\{size\}/g, c.size);
2012-09-27 19:57:19 +00:00
if ( url !== '' ) {
2012-03-07 17:59:39 +00:00
// loading icon
c.temp = $('<div/>', {
2012-09-27 19:57:19 +00:00
'class' : 'tablesorter-processing',
2012-03-07 17:59:39 +00:00
width : $t.outerWidth(true),
height: $t.outerHeight(true)
});
2012-09-27 19:57:19 +00:00
$t.before( c.temp );
$(document).ajaxError(function(e, xhr, settings, exception) {
renderAjax(null, table, c, exception);
});
2012-03-07 17:59:39 +00:00
$.getJSON(url, function(data) {
renderAjax(data, table, c);
2012-03-07 17:59:39 +00:00
});
}
},
2011-10-14 01:57:46 +00:00
renderTable = function(table, rows, c) {
2011-07-17 15:01:18 +00:00
var i, j, o,
2012-04-29 02:45:34 +00:00
f = document.createDocumentFragment(),
2011-07-17 15:01:18 +00:00
l = rows.length,
2012-09-27 19:57:19 +00:00
s = ( c.page * c.size ),
e = ( s + c.size );
if ( l < 1 ) { return; } // empty table, abort!
2011-10-14 01:57:46 +00:00
$(table).trigger('pagerChange', c);
2012-09-27 19:57:19 +00:00
if ( !c.removeRows ) {
2011-09-22 22:32:58 +00:00
hideRows(table, c);
} else {
2012-09-27 19:57:19 +00:00
if ( e > rows.length ) {
2011-09-22 22:32:58 +00:00
e = rows.length;
}
2012-05-28 15:01:40 +00:00
$(table.tBodies[0]).addClass('tablesorter-hidden');
2012-05-03 14:46:31 +00:00
$.tablesorter.clearTableBody(table);
2012-09-27 19:57:19 +00:00
for ( i = s; i < e; i++ ) {
2011-09-22 22:32:58 +00:00
o = rows[i];
l = o.length;
2012-09-27 19:57:19 +00:00
for ( j = 0; j < l; j++ ) {
2012-04-29 02:45:34 +00:00
f.appendChild(o[j]);
2011-09-22 22:32:58 +00:00
}
2011-06-22 23:19:27 +00:00
}
2012-04-29 02:45:34 +00:00
table.tBodies[0].appendChild(f);
2012-05-28 15:01:40 +00:00
$(table.tBodies[0]).removeClass('tablesorter-hidden');
2011-06-22 23:19:27 +00:00
}
2011-09-22 22:32:58 +00:00
if ( c.page >= c.totalPages ) {
2011-10-14 01:57:46 +00:00
moveToLastPage(table, c);
2011-07-17 15:01:18 +00:00
}
2011-10-14 01:57:46 +00:00
updatePageDisplay(table, c);
2012-09-27 19:57:19 +00:00
if ( !c.isDisabled ) { fixHeight(table, c); }
2012-05-04 15:45:16 +00:00
$(table).trigger('applyWidgets');
2011-07-17 15:01:18 +00:00
},
2011-10-14 01:57:46 +00:00
showAllRows = function(table, c){
2012-09-27 19:57:19 +00:00
if ( c.ajax ) {
2012-03-07 17:59:39 +00:00
pagerArrows(c, true);
} else {
c.isDisabled = true;
$.data(table, 'pagerLastPage', c.page);
$.data(table, 'pagerLastSize', c.size);
c.page = 0;
c.size = c.totalRows;
c.totalPages = 1;
$('tr.pagerSavedHeightSpacer', table.tBodies[0]).remove();
renderTable(table, table.config.rowsCopy, c);
}
// disable size selector
$(c.cssPageSize, c.container).addClass(c.cssDisabled)[0].disabled = true;
2011-10-14 01:57:46 +00:00
},
moveToPage = function(table, c) {
2012-09-27 19:57:19 +00:00
if ( c.isDisabled ) { return; }
var p = Math.min( c.totalPages, c.filteredPages );
if ( c.page < 0 || c.page > ( p - 1 ) ) {
2011-06-22 23:19:27 +00:00
c.page = 0;
}
2012-03-07 17:59:39 +00:00
$.data(table, 'pagerLastPage', c.page);
2012-09-27 19:57:19 +00:00
if ( c.ajax ) {
2012-03-07 17:59:39 +00:00
getAjax(table, c);
} else {
renderTable(table, table.config.rowsCopy, c);
}
2011-07-17 15:01:18 +00:00
},
2011-10-14 01:57:46 +00:00
setPageSize = function(table, size, c) {
2012-03-07 17:59:39 +00:00
c.size = size;
$.data(table, 'pagerLastPage', c.page);
$.data(table, 'pagerLastSize', c.size);
2012-09-27 19:57:19 +00:00
c.totalPages = Math.ceil( c.totalRows / c.size );
2011-10-14 01:57:46 +00:00
moveToPage(table, c);
2011-07-17 15:01:18 +00:00
},
2011-10-14 01:57:46 +00:00
moveToFirstPage = function(table, c) {
2011-07-17 15:01:18 +00:00
c.page = 0;
2011-10-14 01:57:46 +00:00
moveToPage(table, c);
2011-07-17 15:01:18 +00:00
},
2011-10-14 01:57:46 +00:00
moveToLastPage = function(table, c) {
2012-09-27 19:57:19 +00:00
c.page = ( Math.min( c.totalPages, c.filteredPages ) - 1 );
2011-10-14 01:57:46 +00:00
moveToPage(table, c);
2011-07-17 15:01:18 +00:00
},
2011-10-14 01:57:46 +00:00
moveToNextPage = function(table, c) {
2011-07-17 15:01:18 +00:00
c.page++;
2012-09-27 19:57:19 +00:00
if ( c.page >= ( Math.min( c.totalPages, c.filteredPages ) - 1 ) ) {
c.page = ( Math.min( c.totalPages, c.filteredPages ) - 1 );
2011-06-22 23:19:27 +00:00
}
2011-10-14 01:57:46 +00:00
moveToPage(table, c);
2011-07-17 15:01:18 +00:00
},
2011-10-14 01:57:46 +00:00
moveToPrevPage = function(table, c) {
2011-07-17 15:01:18 +00:00
c.page--;
2012-09-27 19:57:19 +00:00
if ( c.page <= 0 ) {
2011-07-17 15:01:18 +00:00
c.page = 0;
2011-06-22 23:19:27 +00:00
}
2011-10-14 01:57:46 +00:00
moveToPage(table, c);
2011-09-08 16:28:10 +00:00
},
2011-10-14 01:57:46 +00:00
destroyPager = function(table, c){
showAllRows(table, c);
2012-09-27 19:57:19 +00:00
$(c.container).hide(); // hide pager
2012-03-07 17:59:39 +00:00
table.config.appender = null; // remove pager appender function
2012-09-27 19:57:19 +00:00
$(table).unbind('destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager');
2011-10-14 01:57:46 +00:00
},
2012-03-07 17:59:39 +00:00
enablePager = function(table, c, triggered){
var p = $(c.cssPageSize, c.container).removeClass(c.cssDisabled).removeAttr('disabled');
2011-10-14 01:57:46 +00:00
c.isDisabled = false;
2012-03-17 19:45:40 +00:00
c.page = $.data(table, 'pagerLastPage') || c.page || 0;
c.size = $.data(table, 'pagerLastSize') || parseInt(p.val(), 10) || c.size;
2012-09-27 19:57:19 +00:00
c.totalPages = Math.ceil( Math.min( c.totalPages, c.filteredPages ) / c.size);
if ( triggered ) {
$(table).trigger('update');
2012-03-07 17:59:39 +00:00
setPageSize(table, c.size, c);
hideRowsSetup(table, c);
fixHeight(table, c);
}
2011-07-17 15:01:18 +00:00
};
2012-03-07 17:59:39 +00:00
$this.appender = function(table, rows) {
var c = table.config.pager;
2012-09-27 19:57:19 +00:00
if ( !c.ajax ) {
2012-03-07 17:59:39 +00:00
table.config.rowsCopy = rows;
c.totalRows = rows.length;
c.size = $.data(table, 'pagerLastSize') || c.size;
c.totalPages = Math.ceil(c.totalRows / c.size);
renderTable(table, rows, c);
}
2011-07-17 15:01:18 +00:00
};
2012-03-07 17:59:39 +00:00
$this.construct = function(settings) {
2011-07-17 15:01:18 +00:00
return this.each(function() {
2012-03-07 17:59:39 +00:00
var config = this.config,
2012-09-27 19:57:19 +00:00
c = config.pager = $.extend( {}, $.tablesorterPager.defaults, settings ),
2011-07-17 15:01:18 +00:00
table = this,
2012-03-07 17:59:39 +00:00
$t = $(table),
2012-09-27 19:57:19 +00:00
pager = $(c.container).addClass('tablesorter-pager').show(); // added in case the pager is reinitialized after being destroyed.
2012-03-07 17:59:39 +00:00
config.appender = $this.appender;
enablePager(table, c, false);
2012-09-27 19:57:19 +00:00
if ( typeof(c.ajaxUrl) === 'string' ) {
2012-03-07 17:59:39 +00:00
// ajax pager; interact with database
c.ajax = true;
getAjax(table, c);
} else {
c.ajax = false;
// Regular pager; all rows stored in memory
2012-05-23 17:11:30 +00:00
$(this).trigger("appendCache", true);
2012-03-07 17:59:39 +00:00
hideRowsSetup(table, c);
}
2011-07-17 15:01:18 +00:00
2012-09-27 19:57:19 +00:00
if ( $(table).hasClass('hasFilters') ) {
$(table).unbind('filterEnd.pager').bind('filterEnd.pager', function() {
c.page = 0;
updatePageDisplay(table, c);
moveToPage(table, c);
changeHeight(table, c);
});
}
if ( $(c.cssGoto, pager).length ) {
$(c.cssGoto, pager).bind('change', function(){
c.page = $(this).val() - 1;
moveToPage(table, c);
});
updatePageDisplay(table, c);
}
2011-10-14 01:57:46 +00:00
$(c.cssFirst,pager).unbind('click.pager').bind('click.pager', function() {
2012-09-27 19:57:19 +00:00
if ( !$(this).hasClass(c.cssDisabled) ) { moveToFirstPage(table, c); }
2011-07-17 15:01:18 +00:00
return false;
});
2011-10-14 01:57:46 +00:00
$(c.cssNext,pager).unbind('click.pager').bind('click.pager', function() {
2012-09-27 19:57:19 +00:00
if ( !$(this).hasClass(c.cssDisabled) ) { moveToNextPage(table, c); }
2011-07-17 15:01:18 +00:00
return false;
});
2011-10-14 01:57:46 +00:00
$(c.cssPrev,pager).unbind('click.pager').bind('click.pager', function() {
2012-09-27 19:57:19 +00:00
if ( !$(this).hasClass(c.cssDisabled) ) { moveToPrevPage(table, c); }
2011-07-17 15:01:18 +00:00
return false;
});
2011-10-14 01:57:46 +00:00
$(c.cssLast,pager).unbind('click.pager').bind('click.pager', function() {
2012-09-27 19:57:19 +00:00
if ( !$(this).hasClass(c.cssDisabled) ) { moveToLastPage(table, c); }
2011-07-17 15:01:18 +00:00
return false;
2011-06-22 23:19:27 +00:00
});
2011-10-14 01:57:46 +00:00
$(c.cssPageSize,pager).unbind('change.pager').bind('change.pager', function() {
2012-03-07 17:59:39 +00:00
$(c.cssPageSize,pager).val( $(this).val() ); // in case there are more than one pagers
2012-09-27 19:57:19 +00:00
if ( !$(this).hasClass(c.cssDisabled) ) {
setPageSize(table, parseInt( $(this).val(), 10 ), c);
2012-03-07 17:59:39 +00:00
changeHeight(table, c);
}
2011-07-17 15:01:18 +00:00
return false;
});
2012-03-07 17:59:39 +00:00
$t
2012-09-27 19:57:19 +00:00
.unbind('disable.pager enable.pager destroy.pager update.pager')
2012-03-07 17:59:39 +00:00
.bind('disable.pager', function(){
showAllRows(table, c);
})
.bind('enable.pager', function(){
enablePager(table, c, true);
})
.bind('destroy.pager', function(){
destroyPager(table, c);
2012-09-27 19:57:19 +00:00
})
.bind('update.pager', function(){
hideRows(table, c);
2012-03-07 17:59:39 +00:00
});
2011-07-17 15:01:18 +00:00
});
};
2012-09-27 19:57:19 +00:00
}()
2011-07-17 15:01:18 +00:00
});
// extend plugin scope
$.fn.extend({
tablesorterPager: $.tablesorterPager.construct
});
})(jQuery);