Skip to content

Commit

Permalink
Pager updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemKo7v committed Feb 14, 2018
1 parent 01b0b1c commit 9643fca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/ethplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1423,9 +1423,9 @@ Ethplorer = {
var pages = Math.ceil(recordsCount / Ethplorer.pageSize);
var lastPage = true;
for(var i=1; i<=pages; i++){
var page = $('<LI>');
page.addClass('page-item');
if((i <= 1) || ((i <= 5) &&(currentPage <= 4)) || ((i >= (pages - 4)) &&(currentPage >= (pages - 3))) || (i >= (pages)) || ((i >= (currentPage - 1)) && (i <= (currentPage + 1)))){
var page = $('<LI>');
page.addClass('page-item');
var link = $('<a>');
link.html(i);
if(i === currentPage){
Expand All @@ -1447,6 +1447,8 @@ Ethplorer = {
page.html(link);
lastPage = true;
}else if(lastPage){
var page = $('<LI>');
page.addClass('page-item');
lastPage = false;
var splitter = $('<a>');
splitter.html('...');
Expand Down

0 comments on commit 9643fca

Please sign in to comment.