fixing bug with pages - don't show a last empty page

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@43190 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2016-07-12 10:47:16 +00:00
parent ee3948b614
commit 00f9d6c5f6
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ export class pagingFormatterNoLoad {
console.info("In paging -- CurrentPage:"+this.currentPage+" "+"total Pages = "+this.getTotalPages() +" Results num:"+this.totalResults); console.info("In paging -- CurrentPage:"+this.currentPage+" "+"total Pages = "+this.getTotalPages() +" Results num:"+this.totalResults);
} }
getTotalPages(){ getTotalPages(){
return parseInt(''+(this.totalResults/this.size+1)); var i= this.totalResults/this.size;
var integerI=parseInt(''+i);
return parseInt(''+((i==integerI)?i:i+1));
} }
onPrev(){ onPrev(){
this.currentPage=-1; this.currentPage=-1;