mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
starring support (#43)
This commit is contained in:
@@ -99,6 +99,11 @@ function($scope, $timeout, $stateParams, $window, $location, $state, $route, Cat
|
||||
$scope.selectedType = $stateParams._type;
|
||||
$scope.selectedId = $stateParams._id;
|
||||
|
||||
$scope.starred = {
|
||||
id: 'starred',
|
||||
name: 'Starred'
|
||||
};
|
||||
|
||||
$scope.$on('$stateChangeSuccess', function() {
|
||||
$scope.selectedType = $stateParams._type;
|
||||
$scope.selectedId = $stateParams._id;
|
||||
@@ -339,6 +344,18 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.star = function(entry, star, event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
if (entry.starred != star) {
|
||||
entry.starred = star;
|
||||
EntryService.star({
|
||||
id : entry.id,
|
||||
starred : star
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.isOpen = false;
|
||||
$scope.entryClicked = function(entry, event) {
|
||||
|
||||
Reference in New Issue
Block a user