Permalink
Browse files

pager now updates with updateComplete event

  • Loading branch information...
1 parent 5a62860 commit 6d8fe95da872d38c2e3ae2c43af11bda7ebb622e @Mottie committed Oct 25, 2012
View
Binary file not shown.
@@ -1,6 +1,6 @@
/*!
* tablesorter pager plugin
- * updated 10/17/2012
+ * updated 10/25/2012
*/
/*jshint browser:true, jquery:true */
;(function($) {
@@ -209,7 +209,7 @@
$sh = $t.find('.' + ((tc.widgetOptions && tc.widgetOptions.stickyHeaders) || 'tablesorter-stickyheader'));
$f = $t.find('tfoot tr:first').children();
$t.find('th.' + tc.cssHeader).each(function(j){
- var $t = $(this), tar, icn;
+ var $t = $(this), icn;
// add new test within the first span it finds, or just in the header
if ( $t.find('.' + tc.cssIcon).length ) {
icn = $t.find('.' + tc.cssIcon).clone(true);
@@ -248,7 +248,7 @@
getAjax = function(table, c){
var $t = $(table),
url = (c.ajaxUrl) ? c.ajaxUrl.replace(/\{page\}/g, c.page).replace(/\{size\}/g, c.size) : '',
- k, arry = [],
+ arry = [],
sl = table.config.sortList,
col = url.match(/\{sortList[\s+]?:[\s+]?(.*)\}/);
if (col) {
@@ -434,14 +434,14 @@
}
// update pager after filter widget completes
- if ( $(table).hasClass('hasFilters') ) {
- $(table).unbind('filterEnd.pager').bind('filterEnd.pager', function() {
+ $(table)
+ .unbind('filterEnd.pager updateComplete.pager ')
+ .bind('filterEnd.pager updateComplete.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(){

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,5 +1,5 @@
/*!
-* TableSorter 2.4.5 - Client-side table sorting with ease!
+* TableSorter 2.4.6 - Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
* Copyright (c) 2007 Christian Bach
@@ -493,10 +493,9 @@
}
function resortComplete($table, callback){
- var t = $table[0];
$table.trigger('updateComplete');
if (typeof callback === "function") {
- callback(t);
+ callback($table[0]);
}
}
Oops, something went wrong.

0 comments on commit 6d8fe95

Please sign in to comment.