Don't show NC delete confirmation if an item can't be deleted
This commit is contained in:
committed by
Sebastiaan Janssen
parent
a51f7b29de
commit
3f4bff9ac3
@@ -154,6 +154,11 @@
|
||||
|
||||
.umb-nested-content__icon--disabled {
|
||||
opacity: 0.3;
|
||||
cursor: default !important;
|
||||
|
||||
&:hover {
|
||||
color: @ui-option-type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -271,13 +271,15 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
};
|
||||
|
||||
$scope.deleteNode = function (idx) {
|
||||
if ($scope.nodes.length > $scope.model.config.minItems) {
|
||||
$scope.nodes.splice(idx, 1);
|
||||
$scope.setDirty();
|
||||
updateModel();
|
||||
}
|
||||
$scope.nodes.splice(idx, 1);
|
||||
$scope.setDirty();
|
||||
updateModel();
|
||||
};
|
||||
$scope.requestDeleteNode = function (idx) {
|
||||
if ($scope.nodes.length <= $scope.model.config.minItems) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($scope.model.config.confirmDeletes === true) {
|
||||
localizationService.localizeMany(["content_nestedContentDeleteItem", "general_delete", "general_cancel", "contentTypeEditor_yesDelete"]).then(function (data) {
|
||||
const overlay = {
|
||||
|
||||
Reference in New Issue
Block a user