Skip to content

Commit

Permalink
Merge pull request johnpapa#42 from patrykbialek/master
Browse files Browse the repository at this point in the history
fix for paging, related issue johnpapa#34
  • Loading branch information
johnpapa committed Dec 11, 2014
2 parents 9279019 + 3b1d55c commit 5a5e1b9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cc-bmean/src/client/app/attendee/attendees.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@

Object.defineProperty(vm.paging, 'pageCount', {
get: function () {
return Math.floor(vm.attendeeFilteredCount / vm.paging.pageSize) + 1;
var val = 1;

if (vm.attendeeFilteredCount % vm.paging.pageSize == 0)
val = 0;

return Math.floor(vm.attendeeFilteredCount / vm.paging.pageSize) + val;
}
});

Expand Down Expand Up @@ -85,4 +90,4 @@
getAttendees();
}
}
})();
})();

0 comments on commit 5a5e1b9

Please sign in to comment.