mark all as read

This commit is contained in:
Athou
2013-03-25 21:01:29 +01:00
parent 2c3a5274be
commit fa83a6a903
9 changed files with 81 additions and 27 deletions

View File

@@ -89,7 +89,7 @@ module.directive('category', function($compile) {
};
});
module.directive('toolbar', function(SettingsService) {
module.directive('toolbar', function($routeParams, $route, SettingsService, EntryService, SubscriptionService) {
return {
scope : {},
restrict : 'E',
@@ -99,6 +99,17 @@ module.directive('toolbar', function(SettingsService) {
$scope.settings = SettingsService.settings;
$scope.refresh = function() {
$route.reload();
},
$scope.markAllAsRead = function() {
EntryService.mark({
type: $routeParams._type,
id: $routeParams._id,
read: true,
}, function() {
SubscriptionService.init(function() {
$route.reload();
});
});
}
},
link : function($scope, element) {