toggle between unread and all entries

This commit is contained in:
Athou
2013-03-23 17:56:19 +01:00
parent 84e4751e07
commit 1871fa1169
4 changed files with 38 additions and 12 deletions

View File

@@ -86,12 +86,18 @@ module.controller('FeedListCtrl', function($scope, $routeParams, $http,
$scope.selectedType = $routeParams._type;
$scope.selectedId = $routeParams._id;
$scope.entryList = EntryService.get({
_type : $scope.selectedType,
_id : $scope.selectedId,
_readtype : 'unread'
})
$scope.readType = 'all';
$scope.refreshList = function() {
$scope.entryList = EntryService.get({
_type : $scope.selectedType,
_id : $scope.selectedId,
_readtype : $scope.readType
});
};
$scope.refreshList();
$scope.mark = function(entry, read) {
if (entry.read != read) {
entry.read = read;