Pager: update goto independently of other elements. Fixes #811

This commit is contained in:
Mottie 2015-02-04 07:29:07 -06:00
parent 8ff560e00f
commit 1ffd4a0a20
2 changed files with 16 additions and 17 deletions

View File

@ -193,8 +193,6 @@
} }
return extra.length > 1 && data && data[extra[0]] ? data[extra[0]][extra[1]] : p[str] || (data ? data[str] : deflt) || deflt; return extra.length > 1 && data && data[extra[0]] ? data[extra[0]][extra[1]] : p[str] || (data ? data[str] : deflt) || deflt;
}); });
if ($out.length) {
$out[ ($out[0].tagName === 'INPUT') ? 'val' : 'html' ](s);
if ( p.$goto.length ) { if ( p.$goto.length ) {
t = ''; t = '';
$.each(buildPageSelect(p), function(i, opt){ $.each(buildPageSelect(p), function(i, opt){
@ -203,6 +201,8 @@
// innerHTML doesn't work in IE9 - http://support2.microsoft.com/kb/276228 // innerHTML doesn't work in IE9 - http://support2.microsoft.com/kb/276228
p.$goto.html(t).val( p.page + 1 ); p.$goto.html(t).val( p.page + 1 );
} }
if ($out.length) {
$out[ ($out[0].tagName === 'INPUT') ? 'val' : 'html' ](s);
// rebind startRow/page inputs // rebind startRow/page inputs
$out.find('.ts-startRow, .ts-page').unbind('change').bind('change', function(){ $out.find('.ts-startRow, .ts-page').unbind('change').bind('change', function(){
var v = $(this).val(), var v = $(this).val(),

View File

@ -430,9 +430,6 @@ tsp = ts.pager = {
} }
return extra.length > 1 && data && data[extra[0]] ? data[extra[0]][extra[1]] : p[str] || (data ? data[str] : deflt) || deflt; return extra.length > 1 && data && data[extra[0]] ? data[extra[0]][extra[1]] : p[str] || (data ? data[str] : deflt) || deflt;
}); });
if ($out.length) {
$out[ ($out[0].tagName === 'INPUT') ? 'val' : 'html' ](s);
if ( p.$goto.length ) { if ( p.$goto.length ) {
t = ''; t = '';
$.each(tsp.buildPageSelect(p, c), function(i, opt){ $.each(tsp.buildPageSelect(p, c), function(i, opt){
@ -441,6 +438,8 @@ tsp = ts.pager = {
// innerHTML doesn't work in IE9 - http://support2.microsoft.com/kb/276228 // innerHTML doesn't work in IE9 - http://support2.microsoft.com/kb/276228
p.$goto.html(t).val( p.page + 1 ); p.$goto.html(t).val( p.page + 1 );
} }
if ($out.length) {
$out[ ($out[0].tagName === 'INPUT') ? 'val' : 'html' ](s);
// rebind startRow/page inputs // rebind startRow/page inputs
$out.find('.ts-startRow, .ts-page').off('change').on('change', function(){ $out.find('.ts-startRow, .ts-page').off('change').on('change', function(){
var v = $(this).val(), var v = $(this).val(),