forked from Archives/Athou_commafeed
keyboard shortcut for marking all entries as read
This commit is contained in:
@@ -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) {
|
$scope.star = function(entry, star, event) {
|
||||||
if (event) {
|
if (event) {
|
||||||
event.preventDefault();
|
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) {
|
Mousetrap.bind('?', function(e) {
|
||||||
$scope.$apply(function() {
|
$scope.$apply(function() {
|
||||||
$scope.shortcutsModal = true;
|
$scope.shortcutsModal = true;
|
||||||
@@ -678,17 +697,7 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer
|
|||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on('markAll', function(event, args) {
|
$scope.$on('markAll', function(event, args) {
|
||||||
var service = $scope.selectedType == 'feed' ? FeedService
|
$scope.markAll();
|
||||||
: CategoryService;
|
|
||||||
service.mark({
|
|
||||||
id : $scope.selectedId,
|
|
||||||
olderThan : $scope.timestamp,
|
|
||||||
read : true
|
|
||||||
}, function() {
|
|
||||||
CategoryService.init(function() {
|
|
||||||
$scope.$emit('emitReload');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on('reload', function(event, args) {
|
$scope.$on('reload', function(event, args) {
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
|
|
||||||
<dt>m</dt>
|
<dt>m</dt>
|
||||||
<dd>mark as read/unread current entry</dd>
|
<dd>mark as read/unread current entry</dd>
|
||||||
|
|
||||||
|
<dt>shift+a</dt>
|
||||||
|
<dd>mark all entries as read</dd>
|
||||||
|
|
||||||
<dt>mouse middleclick</dt>
|
<dt>mouse middleclick</dt>
|
||||||
<dd>open entry in new tab and mark as read</dd>
|
<dd>open entry in new tab and mark as read</dd>
|
||||||
|
|||||||
Reference in New Issue
Block a user