Add pagination to transaction proposals All-tab

This commit is contained in:
Yemel Jardi 2014-05-20 11:14:52 -07:00
commit c51731dc69
3 changed files with 15 additions and 2 deletions

View file

@ -8,6 +8,9 @@ angular.module('copay.transactions').controller('TransactionsController',
$scope.onlyPending = true;
$scope.lastShowed = false;
$scope.txpCurrentPage = 1;
$scope.txpItemsPerPage = 4;
$scope.update = function () {
$scope.loading = false;
controllerUtils.updateTxs({onlyPending:$scope.onlyPending});

View file

@ -19,4 +19,13 @@ angular.module('copay.filters', [])
return { addr: key, value: dic[key] };
});
};
});
})
.filter('paged', function() {
return function(elements, page, pageSize, disable) {
if (disable) return elements;
var from = (page - 1) * pageSize;
var to = from + pageSize;
return elements.slice(from, to);;
};
});