fix premix report page pagination
This commit is contained in:
parent
571b93fd7a
commit
299d88d3f9
|
@ -186,9 +186,13 @@ function opCodeRenderer(txId, nimbus, geth) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const rowsPerPage = 500;
|
||||||
|
var numPages = numRows / rowsPerPage;
|
||||||
|
if(numRows % rowsPerPage != 0) numPages++;
|
||||||
|
|
||||||
$("#paging").paging(numRows, {
|
$("#paging").paging(numRows, {
|
||||||
format: '[< (qq -) nnncnnn (- pp) >]',
|
format: numPages < 10 ? "n".repeat(numPages) : '[< (qq -) nnncnnn (- pp) >]',
|
||||||
perpage: 500,
|
perpage: rowsPerPage,
|
||||||
lapping: 1,
|
lapping: 1,
|
||||||
page: 1,
|
page: 1,
|
||||||
onSelect: function (page) {
|
onSelect: function (page) {
|
||||||
|
@ -269,8 +273,10 @@ function opCodeRenderer(txId, nimbus, geth) {
|
||||||
case 'fill':
|
case 'fill':
|
||||||
return '<li class="uk-disabled"><span>...</span></li>';
|
return '<li class="uk-disabled"><span>...</span></li>';
|
||||||
case 'left':
|
case 'left':
|
||||||
|
if(this.value >= this.page) return '';
|
||||||
return '<li><a href="#">' + this.value + '</a></li>';
|
return '<li><a href="#">' + this.value + '</a></li>';
|
||||||
case 'right':
|
case 'right':
|
||||||
|
if(this.value <= this.page) return '';
|
||||||
return '<li><a href="#">' + this.value + '</a></li>';
|
return '<li><a href="#">' + this.value + '</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue