Pager: prev & next buttons now disable with 0 filtered pages. Fixes #649

This commit is contained in:
Mottie 2014-06-22 06:37:02 -05:00
parent d6666e4999
commit b1b09f1bb8
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@
dis = !!disable,
first = ( dis || p.page === 0 ),
tp = Math.min( p.totalPages, p.filteredPages ),
last = ( dis || (p.page === tp - 1) || p.totalPages === 0 );
last = ( dis || (p.page === tp - 1) || tp === 0 );
if ( p.updateArrows ) {
p.$container.find(p.cssFirst + ',' + p.cssPrev)[ first ? a : r ](d).attr('aria-disabled', first);
p.$container.find(p.cssNext + ',' + p.cssLast)[ last ? a : r ](d).attr('aria-disabled', last);

View File

@ -322,7 +322,7 @@ tsp = ts.pager = {
dis = !!disable,
first = dis || p.page === 0,
tp = Math.min( p.totalPages, p.filteredPages ),
last = dis || p.page === tp - 1 || p.totalPages === 0,
last = dis || p.page === tp - 1 || tp === 0,
wo = c.widgetOptions,
s = wo.pager_selectors;
if ( wo.pager_updateArrows ) {