fix premix report page pagination

This commit is contained in:
andri lim 2019-03-11 16:38:16 +07:00
parent 571b93fd7a
commit 299d88d3f9
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 8 additions and 2 deletions

View File

@ -186,9 +186,13 @@ function opCodeRenderer(txId, nimbus, geth) {
return;
}
const rowsPerPage = 500;
var numPages = numRows / rowsPerPage;
if(numRows % rowsPerPage != 0) numPages++;
$("#paging").paging(numRows, {
format: '[< (qq -) nnncnnn (- pp) >]',
perpage: 500,
format: numPages < 10 ? "n".repeat(numPages) : '[< (qq -) nnncnnn (- pp) >]',
perpage: rowsPerPage,
lapping: 1,
page: 1,
onSelect: function (page) {
@ -269,8 +273,10 @@ function opCodeRenderer(txId, nimbus, geth) {
case 'fill':
return '<li class="uk-disabled"><span>...</span></li>';
case 'left':
if(this.value >= this.page) return '';
return '<li><a href="#">' + this.value + '</a></li>';
case 'right':
if(this.value <= this.page) return '';
return '<li><a href="#">' + this.value + '</a></li>';
}
}