mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
pager now updates with updateComplete event
This commit is contained in:
parent
5a62860b47
commit
6d8fe95da8
BIN
README.markdown
BIN
README.markdown
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(){
|
||||
|
4
addons/pager/jquery.tablesorter.pager.min.js
vendored
4
addons/pager/jquery.tablesorter.pager.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
4
js/jquery.tablesorter.min.js
vendored
4
js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user