Permalink
Browse files

Page Index sollte keine Nachkommastellen haben

  • Loading branch information...
1 parent 6ee04d7 commit a929bfeea06db92e7727ace4c485b0f73ec840b5 Stephan committed Dec 7, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/modules/localeEdit/views.js
@@ -217,13 +217,17 @@ Views.EditList = Backbone.View.extend({
this.goToPage(this.currentPage -= 1);
},
nextPage: function(){
+ if( (this.currentPage + 1) > (Math.round(this.collection.length / this.pageSize) +1) )
+ {
+ return;
+ }
this.goToPage(this.currentPage += 1);
},
goToStart: function(){
this.goToPage(1);
},
goToEnd: function(){
- this.goToPage((this.collection.length / this.pageSize) +1);
+ this.goToPage(Math.round(this.collection.length / this.pageSize) +1 );
},
changeElementsPerPage:function(pageSize){
console.log('setting page size to:' + Number(pageSize));

0 comments on commit a929bfe

Please sign in to comment.