diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 53577038..eda1a859 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -170,7 +170,7 @@ c.$table.trigger('pagerComplete', p); // save pager info to storage if (p.savePages && ts.storage) { - ts.storage(table, storageKey, { + ts.storage(table, p.storageKey, { page : p.page, size : p.size }); @@ -554,7 +554,7 @@ p.initialized = false; $(table).unbind('destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager'); if (ts.storage) { - ts.storage(table, storageKey, ''); + ts.storage(table, p.storageKey, ''); } }, @@ -612,7 +612,7 @@ ts.setFilters(table, p.currentFilters, false); } if (p.savePages && ts.storage) { - t = ts.storage(table, storageKey) || {}; // fixes #387 + t = ts.storage(table, p.storageKey) || {}; // fixes #387 p.page = isNaN(t.page) ? p.page : t.page; p.size = ( isNaN(t.size) ? p.size : t.size ) || 10; $.data(table, 'pagerLastSize', p.size); diff --git a/addons/pager/jquery.tablesorter.pager.min.js b/addons/pager/jquery.tablesorter.pager.min.js index 511629f9..8fb41413 100644 --- a/addons/pager/jquery.tablesorter.pager.min.js +++ b/addons/pager/jquery.tablesorter.pager.min.js @@ -1,2 +1 @@ -/*! tablesorter pager plugin minified - updated 12/16/2013 (v2.14.5) */ -;(function(h){var k=h.tablesorter;h.extend({tablesorterPager:new function(){this.defaults={container:null,ajaxUrl:null,customAjaxUrl:function(b,a){return a},ajaxObject:{dataType:"json"},processAjaxOnInit:!0,ajaxProcessing:function(b){return[0,[],null]},output:"{startRow} to {endRow} of {totalRows} rows",updateArrows:!0,page:0,size:10,savePages:!0,fixedHeight:!1,countChildRows:!1,removeRows:!1,cssFirst:".first",cssPrev:".prev",cssNext:".next",cssLast:".last",cssGoto:".gotoPage",cssPageDisplay:".pagedisplay", cssPageSize:".pagesize",cssErrorRow:"tablesorter-errorRow",cssDisabled:"disabled",totalRows:0,totalPages:0,filteredRows:0,filteredPages:0,ajaxCounter:0,currentFilters:[],startRow:0,endRow:0,$size:null,last:{}};var v=this,w=function(b,a){var c=b.cssDisabled,e=!!a,f=Math.min(b.totalPages,b.filteredPages);b.updateArrows&&(b.$container.find(b.cssFirst+","+b.cssPrev)[e||0===b.page?"addClass":"removeClass"](c),b.$container.find(b.cssNext+","+b.cssLast)[e||b.page===f-1||0===b.totalPages?"addClass":"removeClass"](c))}, r=function(b,a,c){var e,f,g,d=b.config;e=d.$table.hasClass("hasFilters")&&!a.ajaxUrl;g=(d.widgetOptions&&d.widgetOptions.filter_filteredRow||"filtered")+","+d.selectorRemove+(a.countChildRows?"":",."+d.cssChildRow);f=a.size||10;a.totalPages=Math.ceil(a.totalRows/f);a.filteredRows=e?d.$tbodies.eq(0).children("tr").not("."+g).length:a.totalRows;a.filteredPages=e?Math.ceil(a.filteredRows/f)||1:a.totalPages;if(0<=Math.min(a.totalPages,a.filteredPages)&&(g=a.size*a.page>a.filteredRows,a.startRow=g?1:0=== a.filteredRows?0:a.size*a.page+1,a.page=g?0:a.page,a.endRow=Math.min(a.filteredRows,a.totalRows,a.size*(a.page+1)),e=a.$container.find(a.cssPageDisplay),g=(a.ajaxData&&a.ajaxData.output?a.ajaxData.output||a.output:a.output).replace(/\{page([\-+]\d+)?\}/gi,function(b,d){return a.totalPages?a.page+(d?parseInt(d,10):1):0}).replace(/\{\w+(\s*:\s*\w+)?\}/gi,function(b){b=b.replace(/[{}\s]/g,"");var d=b.split(":"),c=a.ajaxData,e=/(rows?|pages?)$/i.test(b)?0:"";return 1"+e+"";a.$goto.html(g).val(a.page+1)}w(a);a.initialized&&!1!==c&&(d.$table.trigger("pagerComplete",a),a.savePages&&k.storage&&k.storage(b,"tablesorter-pager",{page:a.page,size:a.size}))},t=function(b,a){var c,e=b.config,f=e.$tbodies.eq(0);a.fixedHeight&&(f.find("tr.pagerSavedHeightSpacer").remove(),c=h.data(b,"pagerSavedHeight"))&& (c-=f.height(),5'))},A=function(b,a){var c=b.config.$tbodies.eq(0);c.find("tr.pagerSavedHeightSpacer").remove();h.data(b,"pagerSavedHeight",c.height());t(b,a);h.data(b,"pagerLastSize",a.size)},u=function(b,a){if(!a.ajaxUrl){var c,e=b.config,f=e.$tbodies.eq(0).children(),g=f.length,d=a.page*a.size,h=d+a.size, k=e.widgetOptions&&e.widgetOptions.filter_filteredRow||"filtered",n=0;for(c=0;c=d&&n'+(0===e.status?"Not connected, verify Network":404===e.status?"Requested page not found [404]":500===e.status?"Internal Server Error [500]":"parsererror"===f?"Requested JSON parse failed":"timeout"===f?"Time out error":"abort"===f?"Ajax Request aborted": "Uncaught error: "+e.statusText+" ["+e.status+"]")+"").click(function(){h(this).remove()}).appendTo(l.find("thead:first")),p.$tbodies.eq(0).empty();else{h.isArray(g)?(e=isNaN(g[0])&&!isNaN(g[1]),f=g[e?1:0],c.totalRows=isNaN(f)?c.totalRows||0:f,e=0===c.totalRows?[""]:g[e?0:1]||[],n=g[2]):(c.ajaxData=g,c.totalRows=g.total,n=g.headers,e=g.rows);x=e.length;if(e instanceof jQuery)p.$tbodies.eq(0).empty().append(e);else if(x){for(g=0;g";for(f=0;f"+e[g][f]+"";q+=""}c.processAjaxOnInit?p.$tbodies.eq(0).html(q):c.processAjaxOnInit=!0}n&&n.length===b&&(m=(d=l.hasClass("hasStickyHeaders"))?p.widgetOptions.$sticky.children("thead:first").children().children():"",s=l.find("tfoot tr:first").children(),p.$headers.filter("th").each(function(a){var b=h(this),c;b.find("."+k.css.icon).length?(c=b.find("."+k.css.icon).clone(!0),b.find(".tablesorter-header-inner").html(n[a]).append(c),d&&m.length&&(c=m.eq(a).find("."+k.css.icon).clone(!0), m.eq(a).find(".tablesorter-header-inner").html(n[a]).append(c))):(b.find(".tablesorter-header-inner").html(n[a]),d&&m.length&&m.eq(a).find(".tablesorter-header-inner").html(n[a]));s.eq(a).html(n[a])}))}p.showProcessing&&k.isProcessing(a);c.last.totalPages=c.totalPages=Math.ceil(c.totalRows/(c.size||10));c.last.currentFilters=c.currentFilters;c.last.sortList=(p.sortList||[]).join(",");r(a,c);t(a,c);l.trigger("applyWidgets");l.trigger("update",[!1,function(){c.initialized&&(l.trigger("updateComplete"), l.trigger("pagerChange",c))}])}c.initialized||(c.initialized=!0,h(a).trigger("pagerInitialized",c))},H=function(b,a){var c=G(b,a),e=h(document),f,g=b.config;""!==c&&(g.showProcessing&&k.isProcessing(b,!0),e.bind("ajaxError.pager",function(d,c,f,g){C(null,b,a,c,g);e.unbind("ajaxError.pager")}),f=++a.ajaxCounter,a.ajaxObject.url=c,a.ajaxObject.success=function(c){f(a&&a.length||0))){c.page>=c.totalPages&&D(b,c);c.isDisabled=!1;c.initialized&&h(b).trigger("pagerChange",c);if(c.removeRows){g>a.length&&(g= a.length);k.clearTableBody(b);for(f=k.processTbody(b,b.config.$tbodies.eq(0),!0);ea.page&&(a.page=0);a.page>g-1&&0!==g&&(a.page=g-1);if(f.page!==a.page||f.size!==a.size||f.totalPages!==a.totalPages||(f.currentFilters||[]).join(",")!==(a.currentFilters||[]).join(",")||f.sortList!==(e.sortList||[]).join(","))e.debug&&k.log("Pager changing to page "+a.page),a.last={page:a.page,size:a.size,sortList:(e.sortList||[]).join(","),totalPages:a.totalPages,currentFilters:a.currentFilters|| []},a.ajax?H(b,a):a.ajax||y(b,b.config.rowsCopy,a),h.data(b,"pagerLastPage",a.page),a.initialized&&!1!==c&&(e.$table.trigger("pageMoved",a),e.$table.trigger("applyWidgets"))}},z=function(b,a,c){c.size=a||c.size||10;c.$size.val(c.size);h.data(b,"pagerLastPage",c.page);h.data(b,"pagerLastSize",c.size);c.totalPages=Math.ceil(c.totalRows/c.size);l(b,c)},I=function(b,a){a.page=0;l(b,a)},D=function(b,a){a.page=Math.min(a.totalPages,a.filteredPages)-1;l(b,a)},J=function(b,a){a.page++;a.page>=Math.min(a.totalPages, a.filteredPages)-1&&(a.page=Math.min(a.totalPages,a.filteredPages)-1);l(b,a)},K=function(b,a){a.page--;0>=a.page&&(a.page=0);l(b,a)},F=function(b,a,c){var e=a.$size.removeClass(a.cssDisabled).removeAttr("disabled");a.$goto.removeClass(a.cssDisabled).removeAttr("disabled");a.isDisabled=!1;a.page=h.data(b,"pagerLastPage")||a.page||0;a.size=h.data(b,"pagerLastSize")||parseInt(e.find("option[selected]").val(),10)||a.size||10;e.val(a.size);a.totalPages=Math.ceil(Math.min(a.totalPages,a.filteredPages)/ a.size);c&&(h(b).trigger("update"),z(b,a.size,a),B(b,a),t(b,a),b.config.debug&&k.log("pager enabled"))};v.appender=function(b,a){var c=b.config,e=c.pager;e.ajax||(c.rowsCopy=a,e.totalRows=e.countChildRows?c.$tbodies.eq(0).children().length:a.length,e.size=h.data(b,"pagerLastSize")||e.size||10,e.totalPages=Math.ceil(e.totalRows/e.size),y(b,a,e))};v.construct=function(b){return this.each(function(){if(this.config&&this.hasInitialized){var a,c,e,f=this,g=f.config,d=g.pager=h.extend({},h.tablesorterPager.defaults, b),s=g.$table,m=d.$container=h(d.container).addClass("tablesorter-pager").show();g.debug&&k.log("Pager initializing");d.oldAjaxSuccess=d.oldAjaxSuccess||d.ajaxObject.success;g.appender=v.appender;k.filter&&0<=h.inArray("filter",g.widgets)&&(d.currentFilters=g.$table.data("lastSearch")||k.filter.setDefaults(f,g,g.widgetOptions)||[],k.setFilters(f,d.currentFilters,!1));d.savePages&&k.storage&&(a=k.storage(f,"tablesorter-pager")||{},d.page=isNaN(a.page)?d.page:a.page,d.size=(isNaN(a.size)?d.size:a.size)|| 10,h.data(f,"pagerLastSize",d.size));s.unbind("filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize ".split(" ").join(".pager ")).bind("filterStart.pager",function(a,b){d.currentFilters=b;d.page=0}).bind("filterEnd.pager sortEnd.pager",function(){d.initialized&&(l(f,d,!1),r(f,d,!1),t(f,d))}).bind("disable.pager",function(a){a.stopPropagation();E(f,d)}).bind("enable.pager",function(a){a.stopPropagation();F(f,d,!0)}).bind("destroy.pager",function(a){a.stopPropagation(); E(f,d);d.$container.hide();f.config.appender=null;d.initialized=!1;h(f).unbind("destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager");k.storage&&k.storage(f,"tablesorter-pager","")}).bind("update.pager updateRows.pager updateAll.pager addRows.pager ",function(a){a.stopPropagation();u(f,d)}).bind("pageSize.pager",function(a,b){a.stopPropagation();z(f,parseInt(b,10)||10,d);u(f,d);r(f,d,!1);d.$size.length&&d.$size.val(d.size)}).bind("pageSet.pager",function(a,b){a.stopPropagation(); d.page=(parseInt(b,10)||1)-1;d.$goto.length&&d.$goto.val(d.size);l(f,d);r(f,d,!1)});c=[d.cssFirst,d.cssPrev,d.cssNext,d.cssLast];e=[I,K,J,D];m.find(c.join(",")).unbind("click.pager").bind("click.pager",function(a){a.stopPropagation();var b=h(this),g=c.length;if(!b.hasClass(d.cssDisabled))for(a=0;a=0&&(c=a.size*a.page>a.filteredRows,a.startRow=c?1:0===a.filteredRows?0:a.size*a.page+1,a.page=c?0:a.page,a.endRow=Math.min(a.filteredRows,a.totalRows,a.size*(a.page+1)),g=a.$container.find(a.cssPageDisplay),n=(a.ajaxData&&a.ajaxData.output?a.ajaxData.output||a.output:a.output).replace(/\{page([\-+]\d+)?\}/gi,function(e,t){return a.totalPages?a.page+(t?parseInt(t,10):1):0}).replace(/\{\w+(\s*:\s*\w+)?\}/gi,function(e){var t=e.replace(/[{}\s]/g,""),s=t.split(":"),i=a.ajaxData,r=/(rows?|pages?)$/i.test(t)?0:"";return s.length>1&&i&&i[s[0]]?i[s[0]][s[1]]:a[t]||(i?i[t]:r)||r}),g.length&&(g["INPUT"===g[0].tagName?"val":"html"](n),a.$goto.length))){for(c="",o=Math.min(a.totalPages,a.filteredPages),r=1;o>=r;r++)c+="";a.$goto.html(c).val(a.page+1)}s(a),a.initialized&&i!==!1&&(l.$table.trigger("pagerComplete",a),a.savePages&&t.storage&&t.storage(e,a.storageKey,{page:a.page,size:a.size}))},r=function(t,a){var s,i,r=t.config,o=r.$tbodies.eq(0);a.fixedHeight&&(o.find("tr.pagerSavedHeightSpacer").remove(),i=e.data(t,"pagerSavedHeight"),i&&(s=i-o.height(),s>5&&e.data(t,"pagerLastSize")===a.size&&o.children("tr:visible").length')))},o=function(t,a){var s=t.config.$tbodies.eq(0);s.find("tr.pagerSavedHeightSpacer").remove(),e.data(t,"pagerSavedHeight",s.height()),r(t,a),e.data(t,"pagerLastSize",a.size)},n=function(e,t){if(!t.ajaxUrl){var a,s=e.config,i=s.$tbodies.eq(0).children(),r=i.length,o=t.page*t.size,n=o+t.size,g=s.widgetOptions&&s.widgetOptions.filter_filteredRow||"filtered",l=0;for(a=0;r>a;a++)i[a].className.match(g)||(i[a].style.display=l>=o&&n>l?"":"none",l+=i[a].className.match(s.cssChildRow+"|"+s.selectorRemove.slice(1))&&!t.countChildRows?0:1)}},g=function(t,a){a.size=parseInt(a.$size.val(),10)||a.size,e.data(t,"pagerLastSize",a.size),s(a),a.removeRows||(n(t,a),e(t).bind("sortEnd.pager filterEnd.pager",function(){n(t,a)}))},l=function(a,s,o,n,g){if("function"==typeof o.ajaxProcessing){var l,d,c,p,f,u,h,b,z,w,P,j=s.config,v=j.$table,x="",R=o.ajaxProcessing(a,s)||[0,[]],m=v.find("thead th").length;if(v.find("thead tr."+o.cssErrorRow).remove(),g)j.debug&&t.log("Ajax Error",n,g),w=e(''+(0===n.status?"Not connected, verify Network":404===n.status?"Requested page not found [404]":500===n.status?"Internal Server Error [500]":"parsererror"===g?"Requested JSON parse failed":"timeout"===g?"Time out error":"abort"===g?"Ajax Request aborted":"Uncaught error: "+n.statusText+" ["+n.status+"]")+"").click(function(){e(this).remove()}).appendTo(v.find("thead:first")),j.$tbodies.eq(0).empty();else{if(e.isArray(R)?(u=isNaN(R[0])&&!isNaN(R[1]),P=R[u?1:0],o.totalRows=isNaN(P)?o.totalRows||0:P,b=0===o.totalRows?[""]:R[u?0:1]||[],h=R[2]):(o.ajaxData=R,o.totalRows=R.total,h=R.headers,b=R.rows),z=b.length,b instanceof jQuery)j.$tbodies.eq(0).empty().append(b);else if(z){for(l=0;z>l;l++){for(x+="",d=0;d"+b[l][d]+"";x+=""}o.processAjaxOnInit?j.$tbodies.eq(0).html(x):o.processAjaxOnInit=!0}h&&h.length===m&&(c=v.hasClass("hasStickyHeaders"),f=c?j.widgetOptions.$sticky.children("thead:first").children().children():"",p=v.find("tfoot tr:first").children(),j.$headers.filter("th").each(function(a){var s,i=e(this);i.find("."+t.css.icon).length?(s=i.find("."+t.css.icon).clone(!0),i.find(".tablesorter-header-inner").html(h[a]).append(s),c&&f.length&&(s=f.eq(a).find("."+t.css.icon).clone(!0),f.eq(a).find(".tablesorter-header-inner").html(h[a]).append(s))):(i.find(".tablesorter-header-inner").html(h[a]),c&&f.length&&f.eq(a).find(".tablesorter-header-inner").html(h[a])),p.eq(a).html(h[a])}))}j.showProcessing&&t.isProcessing(s),o.last.totalPages=o.totalPages=Math.ceil(o.totalRows/(o.size||10)),o.last.currentFilters=o.currentFilters,o.last.sortList=(j.sortList||[]).join(","),i(s,o),r(s,o),v.trigger("applyWidgets"),v.trigger("updateRow",[!1,function(){o.initialized&&(v.trigger("updateComplete"),v.trigger("pagerChange",o))}])}o.initialized||(o.initialized=!0,e(s).trigger("pagerInitialized",o))},d=function(a,s){var i,r=c(a,s),o=e(document),n=a.config;""!==r&&(n.showProcessing&&t.isProcessing(a,!0),o.bind("ajaxError.pager",function(e,t,i,r){l(null,a,s,t,r),o.unbind("ajaxError.pager")}),i=++s.ajaxCounter,s.ajaxObject.url=r,s.ajaxObject.success=function(e){id)){if(o.page>=o.totalPages&&z(a,o),o.isDisabled=!1,o.initialized&&e(a).trigger("pagerChange",o),o.removeRows){for(p>s.length&&(p=s.length),t.clearTableBody(a),l=t.processTbody(a,a.config.$tbodies.eq(0),!0),g=c;p>g;g++)l.append(s[g]);t.processTbody(a,l,!1)}else n(a,o);i(a,o),o.isDisabled||r(a,o),e(a).trigger("applyWidgets")}},f=function(a,i){i.ajax?s(i,!0):(i.isDisabled=!0,e.data(a,"pagerLastPage",i.page),e.data(a,"pagerLastSize",i.size),i.page=0,i.size=i.totalRows,i.totalPages=1,e(a).addClass("pagerDisabled").find("tr.pagerSavedHeightSpacer").remove(),p(a,a.config.rowsCopy,i),a.config.debug&&t.log("pager disabled")),i.$size.add(i.$goto).each(function(){e(this).addClass(i.cssDisabled)[0].disabled=!0})},u=function(a,s,i){if(!s.isDisabled){var r=a.config,o=s.last,n=Math.min(s.totalPages,s.filteredPages);s.page<0&&(s.page=0),s.page>n-1&&0!==n&&(s.page=n-1),(o.page!==s.page||o.size!==s.size||o.totalPages!==s.totalPages||(o.currentFilters||[]).join(",")!==(s.currentFilters||[]).join(",")||o.sortList!==(r.sortList||[]).join(","))&&(r.debug&&t.log("Pager changing to page "+s.page),s.last={page:s.page,size:s.size,sortList:(r.sortList||[]).join(","),totalPages:s.totalPages,currentFilters:s.currentFilters||[]},s.ajax?d(a,s):s.ajax||p(a,a.config.rowsCopy,s),e.data(a,"pagerLastPage",s.page),s.initialized&&i!==!1&&(r.$table.trigger("pageMoved",s),r.$table.trigger("applyWidgets")))}},h=function(t,a,s){s.size=a||s.size||10,s.$size.val(s.size),e.data(t,"pagerLastPage",s.page),e.data(t,"pagerLastSize",s.size),s.totalPages=Math.ceil(s.totalRows/s.size),u(t,s)},b=function(e,t){t.page=0,u(e,t)},z=function(e,t){t.page=Math.min(t.totalPages,t.filteredPages)-1,u(e,t)},w=function(e,t){t.page++,t.page>=Math.min(t.totalPages,t.filteredPages)-1&&(t.page=Math.min(t.totalPages,t.filteredPages)-1),u(e,t)},P=function(e,t){t.page--,t.page<=0&&(t.page=0),u(e,t)},j=function(a,s){f(a,s),s.$container.hide(),a.config.appender=null,s.initialized=!1,e(a).unbind("destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager"),t.storage&&t.storage(a,s.storageKey,"")},v=function(a,s,i){var o=s.$size.removeClass(s.cssDisabled).removeAttr("disabled");s.$goto.removeClass(s.cssDisabled).removeAttr("disabled"),s.isDisabled=!1,s.page=e.data(a,"pagerLastPage")||s.page||0,s.size=e.data(a,"pagerLastSize")||parseInt(o.find("option[selected]").val(),10)||s.size||10,o.val(s.size),s.totalPages=Math.ceil(Math.min(s.totalRows,s.filteredRows)/s.size),i&&(e(a).trigger("updateRow"),h(a,s.size,s),g(a,s),r(a,s),a.config.debug&&t.log("pager enabled"))};a.appender=function(t,a){var s=t.config,i=s.pager;i.ajax||(s.rowsCopy=a,i.totalRows=i.countChildRows?s.$tbodies.eq(0).children().length:a.length,i.size=e.data(t,"pagerLastSize")||i.size||10,i.totalPages=Math.ceil(i.totalRows/i.size),p(t,a,i))},a.construct=function(s){return this.each(function(){if(this.config&&this.hasInitialized){var l,d,c,p=this,x=p.config,R=x.pager=e.extend({},e.tablesorterPager.defaults,s),m=x.$table,$=R.$container=e(R.container).addClass("tablesorter-pager").show();x.debug&&t.log("Pager initializing"),R.oldAjaxSuccess=R.oldAjaxSuccess||R.ajaxObject.success,x.appender=a.appender,t.filter&&e.inArray("filter",x.widgets)>=0&&(R.currentFilters=x.$table.data("lastSearch")||t.filter.setDefaults(p,x,x.widgetOptions)||[],t.setFilters(p,R.currentFilters,!1)),R.savePages&&t.storage&&(l=t.storage(p,R.storageKey)||{},R.page=isNaN(l.page)?R.page:l.page,R.size=(isNaN(l.size)?R.size:l.size)||10,e.data(p,"pagerLastSize",R.size)),m.unbind("filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize ".split(" ").join(".pager ")).bind("filterStart.pager",function(e,t){R.currentFilters=t,R.page=0}).bind("filterEnd.pager sortEnd.pager",function(){R.initialized&&(u(p,R,!1),i(p,R,!1),r(p,R))}).bind("disable.pager",function(e){e.stopPropagation(),f(p,R)}).bind("enable.pager",function(e){e.stopPropagation(),v(p,R,!0)}).bind("destroy.pager",function(e){e.stopPropagation(),j(p,R)}).bind("update updateRows updateAll addRows ".split(" ").join(".pager "),function(e){e.stopPropagation(),n(p,R)}).bind("pageSize.pager",function(e,t){e.stopPropagation(),h(p,parseInt(t,10)||10,R),n(p,R),i(p,R,!1),R.$size.length&&R.$size.val(R.size)}).bind("pageSet.pager",function(e,t){e.stopPropagation(),R.page=(parseInt(t,10)||1)-1,R.$goto.length&&R.$goto.val(R.size),u(p,R),i(p,R,!1)}),d=[R.cssFirst,R.cssPrev,R.cssNext,R.cssLast],c=[b,P,w,z],$.find(d.join(",")).unbind("click.pager").bind("click.pager",function(t){t.stopPropagation();var a,s=e(this),i=d.length;if(!s.hasClass(R.cssDisabled))for(a=0;i>a;a++)if(s.is(d[a])){c[a](p,R);break}}),R.$goto=$.find(R.cssGoto),R.$goto.length&&R.$goto.unbind("change").bind("change",function(){R.page=e(this).val()-1,u(p,R),i(p,R,!1)}),R.$size=$.find(R.cssPageSize),R.$size.length&&R.$size.unbind("change.pager").bind("change.pager",function(){return R.$size.val(e(this).val()),e(this).hasClass(R.cssDisabled)||(h(p,parseInt(e(this).val(),10),R),o(p,R)),!1}),R.initialized=!1,m.trigger("pagerBeforeInitialized",R),v(p,R,!1),"string"==typeof R.ajaxUrl?(R.ajax=!0,x.widgetOptions.filter_serversideFiltering=!0,x.serverSideSorting=!0,u(p,R)):(R.ajax=!1,e(this).trigger("appendCache",!0),g(p,R)),o(p,R),R.ajax||(R.initialized=!0,e(p).trigger("pagerInitialized",R))}})}}}),e.fn.extend({tablesorterPager:e.tablesorterPager.construct})}(jQuery); \ No newline at end of file