Add confirmation dialog to delete options
this is only a temporary solution but it will probably safe some users from deleting their data by accident Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -169,8 +169,14 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
};
|
||||
|
||||
$scope.cardDelete = function (card) {
|
||||
CardService.delete(card.id);
|
||||
StackService.removeCard(card);
|
||||
OC.dialogs.confirm(t('deck', 'Are you sure you want to delete this card with all of its data?'), t('deck', 'Delete'), function(state) {
|
||||
if (!state) {
|
||||
return;
|
||||
}
|
||||
CardService.delete(card.id).then(function () {
|
||||
StackService.removeCard(card);
|
||||
});
|
||||
});
|
||||
};
|
||||
$scope.cardArchive = function (card) {
|
||||
CardService.archive(card);
|
||||
|
||||
Reference in New Issue
Block a user