V8: Add confirmation when deleting content and media (#6005)
(cherry picked from commit 16ab7b70cf)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
18c0298720
commit
c7cb3f81f4
@@ -58,7 +58,7 @@ function ContentDeleteController($scope, $timeout, contentResource, treeService,
|
||||
$location.path(location);
|
||||
}
|
||||
|
||||
navigationService.hideMenu();
|
||||
$scope.success = true;
|
||||
}, function(err) {
|
||||
|
||||
toggleDeleting(false);
|
||||
@@ -74,7 +74,11 @@ function ContentDeleteController($scope, $timeout, contentResource, treeService,
|
||||
|
||||
$scope.cancel = function() {
|
||||
toggleDeleting(false);
|
||||
navigationService.hideDialog();
|
||||
$scope.close();
|
||||
};
|
||||
|
||||
$scope.close = function () {
|
||||
navigationService.hideDialog();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,25 @@
|
||||
<div class="umb-dialog umb-pane" ng-controller="Umbraco.Editors.Content.DeleteController">
|
||||
<div class="umb-dialog-body" auto-scale="90">
|
||||
|
||||
<p class="abstract">
|
||||
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
|
||||
</p>
|
||||
|
||||
<div class="umb-alert umb-alert--warning">
|
||||
<localize key="defaultdialogs_variantdeletewarning">This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead.</localize>
|
||||
<div ng-show="success">
|
||||
<div class="alert alert-success">
|
||||
<strong>{{currentNode.name}}</strong>
|
||||
<localize key="actions_wasDeleted">was deleted</localize>
|
||||
</div>
|
||||
<button class="btn btn-primary" ng-click="close()">Ok</button>
|
||||
</div>
|
||||
|
||||
<umb-confirm on-confirm="performDelete" confirm-button-style="danger" on-cancel="cancel"></umb-confirm>
|
||||
<div ng-hide="success">
|
||||
<p class="abstract">
|
||||
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
|
||||
</p>
|
||||
|
||||
<div class="umb-alert umb-alert--warning">
|
||||
<localize key="defaultdialogs_variantdeletewarning">This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead.</localize>
|
||||
</div>
|
||||
|
||||
<umb-confirm on-confirm="performDelete" confirm-button-style="danger" on-cancel="cancel"></umb-confirm>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
<div class="umb-dialog umb-pane" ng-controller="Umbraco.Editors.Media.DeleteController">
|
||||
<div class="umb-dialog-body" auto-scale="90">
|
||||
|
||||
<p class="abstract">
|
||||
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
|
||||
</p>
|
||||
|
||||
<umb-confirm on-confirm="performDelete" on-cancel="cancel"></umb-confirm>
|
||||
<div ng-show="success">
|
||||
<div class="alert alert-success">
|
||||
<strong>{{currentNode.name}}</strong>
|
||||
<localize key="actions_wasDeleted">was deleted</localize>
|
||||
</div>
|
||||
<button class="btn btn-primary" ng-click="close()">Ok</button>
|
||||
</div>
|
||||
|
||||
<div ng-hide="success">
|
||||
<p class="abstract">
|
||||
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
|
||||
</p>
|
||||
|
||||
<umb-confirm on-confirm="performDelete" on-cancel="close"></umb-confirm>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,8 +50,7 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
|
||||
$location.path(location);
|
||||
}
|
||||
|
||||
navigationService.hideMenu();
|
||||
|
||||
$scope.success = true;
|
||||
}, function (err) {
|
||||
|
||||
$scope.currentNode.loading = false;
|
||||
@@ -66,7 +65,7 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
|
||||
});
|
||||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$scope.close = function() {
|
||||
navigationService.hideDialog();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<key alias="toInTheTreeStructureBelow">til i træstrukturen nedenfor</key>
|
||||
<key alias="wasMovedTo">blev flyttet til</key>
|
||||
<key alias="wasCopiedTo">blev kopieret til</key>
|
||||
<key alias="wasDeleted">blev slettet</key>
|
||||
<key alias="rights">Rettigheder</key>
|
||||
<key alias="rollback">Fortryd ændringer</key>
|
||||
<key alias="sendtopublish">Send til udgivelse</key>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<key alias="toInTheTreeStructureBelow">to in the tree structure below</key>
|
||||
<key alias="wasMovedTo">was moved to</key>
|
||||
<key alias="wasCopiedTo">was copied to</key>
|
||||
<key alias="wasDeleted">was deleted</key>
|
||||
<key alias="rights">Permissions</key>
|
||||
<key alias="rollback">Rollback</key>
|
||||
<key alias="sendtopublish">Send To Publish</key>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<key alias="toInTheTreeStructureBelow">to in the tree structure below</key>
|
||||
<key alias="wasMovedTo">was moved to</key>
|
||||
<key alias="wasCopiedTo">was copied to</key>
|
||||
<key alias="wasDeleted">was deleted</key>
|
||||
<key alias="rights">Permissions</key>
|
||||
<key alias="rollback">Rollback</key>
|
||||
<key alias="sendtopublish">Send To Publish</key>
|
||||
|
||||
Reference in New Issue
Block a user