add confirmation when deleting feed
This commit is contained in:
parent
a3ff77b517
commit
1481fcb22c
1 changed files with 4 additions and 2 deletions
|
@ -39,9 +39,11 @@ function FeedCtrl($scope, $routeParams, $location, feeds, pageSwitcher) {
|
|||
|
||||
$scope.delete = function(id) {
|
||||
//TODO: check we're not playing anything from this feed?
|
||||
feeds.delete(id);
|
||||
if (confirm('Are you sure you want to delete this feed?')) {
|
||||
feeds.delete(id);
|
||||
|
||||
$location.path('/feeds');
|
||||
$location.path('/feeds');
|
||||
}
|
||||
};
|
||||
|
||||
pageSwitcher.setBack('feeds');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue