Skip to content

Commit

Permalink
fixed paging bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Taco van Dijk authored and Taco van Dijk committed Aug 8, 2014
1 parent 3a25a8b commit 7b12dd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/js/detailcontroller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
angular.module('elviewer').controller('DetailController', ['$scope', '$routeParams', 'Repository',function DetailController($scope, $routeParams, Repository)
{
$scope.Repository = Repository;


//get the uid from the routing
var itemId = $routeParams.itemId;
Expand All @@ -11,6 +10,8 @@ angular.module('elviewer').controller('DetailController', ['$scope', '$routePara
{
//so wait until we have something in memory
//before we try to find our item


$scope.$watch('Repository.defaultCollection', function(newValue, oldValue)
{
bind(itemId,Repository,$scope);
Expand Down
4 changes: 3 additions & 1 deletion src/js/gridcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ angular.module('elviewer').controller('GridController', ['$scope', 'Repository',
if(newValue != undefined)
{
$scope.applyTimeFilter();


}
},
true
Expand Down Expand Up @@ -112,7 +114,7 @@ angular.module('elviewer').controller('GridController', ['$scope', 'Repository',
{
var page_start = ($scope.page * PAGE_SIZE) + 1;

var page_end = page_start + (PAGE_SIZE - 2);
var page_end = page_start + (PAGE_SIZE - 1);


var total = 0;
Expand Down

0 comments on commit 7b12dd3

Please sign in to comment.