diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index 5b461a1c1b..f4e0e1b986 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -113,24 +113,27 @@ angular.module("umbraco") }; $scope.delete = function () { - $scope.actionInProgress = true; - $scope.bulkStatus = "Starting with delete"; - var current = 1; - var total = $scope.selected.length; - for (var i = 0; i < $scope.selected.length; i++) { - $scope.bulkStatus = "Deleted doc " + current + " out of " + total + " documents"; - contentResource.deleteById($scope.selected[i]).then(function (data) { - if (current == total) { - notificationsService.success("Bulk action", "Deleted " + total + "documents"); - $scope.bulkStatus = ""; - $scope.selected = []; - $scope.reloadView($scope.content.id); - $scope.actionInProgress = false; - } - current++; - }); + + if (confirm("Sure you want to delete?") == true) { + $scope.actionInProgress = true; + $scope.bulkStatus = "Starting with delete"; + var current = 1; + var total = $scope.selected.length; + for (var i = 0; i < $scope.selected.length; i++) { + $scope.bulkStatus = "Deleted doc " + current + " out of " + total + " documents"; + contentResource.deleteById($scope.selected[i]).then(function(data) { + if (current == total) { + notificationsService.success("Bulk action", "Deleted " + total + "documents"); + $scope.bulkStatus = ""; + $scope.selected = []; + $scope.reloadView($scope.content.id); + $scope.actionInProgress = false; + } + current++; + }); + } } - + }; $scope.publish = function () {