diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js index d551364b..5e5f9695 100644 --- a/src/main/webapp/js/controllers.js +++ b/src/main/webapp/js/controllers.js @@ -530,6 +530,20 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer } }; + $scope.markAll = function() { + var service = $scope.selectedType == 'feed' ? FeedService + : CategoryService; + service.mark({ + id : $scope.selectedId, + olderThan : $scope.timestamp, + read : true + }, function() { + CategoryService.init(function() { + $scope.$emit('emitReload'); + }); + }); + }; + $scope.star = function(entry, star, event) { if (event) { event.preventDefault(); @@ -671,6 +685,11 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer } }); }); + Mousetrap.bind('shift+a', function(e) { + $scope.$apply(function() { + $scope.markAll(); + }); + }); Mousetrap.bind('?', function(e) { $scope.$apply(function() { $scope.shortcutsModal = true; @@ -678,17 +697,7 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer }); $scope.$on('markAll', function(event, args) { - var service = $scope.selectedType == 'feed' ? FeedService - : CategoryService; - service.mark({ - id : $scope.selectedId, - olderThan : $scope.timestamp, - read : true - }, function() { - CategoryService.init(function() { - $scope.$emit('emitReload'); - }); - }); + $scope.markAll(); }); $scope.$on('reload', function(event, args) { diff --git a/src/main/webapp/templates/_shortcuts.html b/src/main/webapp/templates/_shortcuts.html index 25ec4306..9466cf06 100644 --- a/src/main/webapp/templates/_shortcuts.html +++ b/src/main/webapp/templates/_shortcuts.html @@ -16,6 +16,9 @@