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:
parent
ee3948b614
commit
00f9d6c5f6
|
@ -52,7 +52,9 @@ export class pagingFormatterNoLoad {
|
|||
console.info("In paging -- CurrentPage:"+this.currentPage+" "+"total Pages = "+this.getTotalPages() +" Results num:"+this.totalResults);
|
||||
}
|
||||
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(){
|
||||
this.currentPage=-1;
|
||||
|
|
Loading…
Reference in New Issue