Property-Action for Remove All Entries in Nested Content (#7036)
* Property-Action for remove all entries from Nested Content * Add "delete all items" confirmation and rephrase action link a bit * Enforce "delete" confirmation type in overlayService.confirmDelete * rename to controller for easier to solve merge conflicts * update removeAllEntriesAction.isDisabled when content changes * minor correction
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
}
|
||||
|
||||
function confirmDelete(overlay) {
|
||||
overlay.confirmType = "delete";
|
||||
confirm(overlay);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,33 @@
|
||||
}
|
||||
|
||||
|
||||
var removeAllEntries = function () {
|
||||
localizationService.localizeMany(["content_nestedContentDeleteAllItems", "general_delete"]).then(function (data) {
|
||||
overlayService.confirmDelete({
|
||||
title: data[1],
|
||||
content: data[0],
|
||||
close: function () {
|
||||
overlayService.close();
|
||||
},
|
||||
submit: function () {
|
||||
vm.nodes = [];
|
||||
setDirty();
|
||||
updateModel();
|
||||
overlayService.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var removeAllEntriesAction = {
|
||||
labelKey: 'clipboard_labelForRemoveAllEntries',
|
||||
labelTokens: [],
|
||||
icon: 'trash',
|
||||
method: removeAllEntries,
|
||||
isDisabled: true
|
||||
}
|
||||
|
||||
|
||||
|
||||
// helper to force the current form into the dirty state
|
||||
function setDirty() {
|
||||
@@ -535,12 +562,14 @@
|
||||
|
||||
function updatePropertyActionStates() {
|
||||
copyAllEntriesAction.isDisabled = !model.value || model.value.length === 0;
|
||||
removeAllEntriesAction.isDisabled = model.value.length === 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var propertyActions = [
|
||||
copyAllEntriesAction
|
||||
copyAllEntriesAction,
|
||||
removeAllEntriesAction
|
||||
];
|
||||
|
||||
this.$onInit = function () {
|
||||
@@ -272,6 +272,7 @@
|
||||
<key alias="scheduledPublishServerTime">Dette oversætter til den følgende tid på serveren:</key>
|
||||
<key alias="scheduledPublishDocumentation"><![CDATA[<a href="https://our.umbraco.com/documentation/Getting-Started/Data/Scheduled-Publishing/#timezones" target="_blank">Hvad betyder det?</a>]]></key>
|
||||
<key alias="nestedContentDeleteItem">Er du sikker på, at du vil slette dette element?</key>
|
||||
<key alias="nestedContentDeleteAllItems">Er du sikker på, at du vil slette alle elementer?</key>
|
||||
<key alias="nestedContentEditorNotSupported">Egenskaben %0% anvender editoren %1% som ikke er understøttet af Nested Content.</key>
|
||||
<key alias="nestedContentNoContentTypes">Der er ikke konfigureret nogen indholdstyper for denne egenskab.</key>
|
||||
<key alias="nestedContentCopyAllItemsName">%0% fra %1%</key>
|
||||
@@ -1772,6 +1773,7 @@ Mange hilsner fra Umbraco robotten
|
||||
<area alias="clipboard">
|
||||
<key alias="labelForCopyAllEntries">Kopier %0%</key>
|
||||
<key alias="labelForArrayOfItemsFrom">%0% fra %1%</key>
|
||||
<key alias="labelForRemoveAllEntries">Fjern alle elementer</key>
|
||||
</area>
|
||||
<area alias="propertyActions">
|
||||
<key alias="tooltipForPropertyActionsMenu">Åben egenskabshandlinger</key>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -277,6 +277,7 @@
|
||||
<key alias="scheduledPublishServerTime">This translates to the following time on the server:</key>
|
||||
<key alias="scheduledPublishDocumentation"><![CDATA[<a href="https://our.umbraco.com/documentation/Getting-Started/Data/Scheduled-Publishing/#timezones" target="_blank">What does this mean?</a>]]></key>
|
||||
<key alias="nestedContentDeleteItem">Are you sure you want to delete this item?</key>
|
||||
<key alias="nestedContentDeleteAllItems">Are you sure you want to delete all items?</key>
|
||||
<key alias="nestedContentEditorNotSupported">Property %0% uses editor %1% which is not supported by Nested Content.</key>
|
||||
<key alias="nestedContentNoContentTypes">No content types are configured for this property.</key>
|
||||
<key alias="nestedContentAddElementType">Add element type</key>
|
||||
@@ -2236,6 +2237,7 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<area alias="clipboard">
|
||||
<key alias="labelForCopyAllEntries">Copy %0%</key>
|
||||
<key alias="labelForArrayOfItemsFrom">%0% from %1%</key>
|
||||
<key alias="labelForRemoveAllEntries">Remove all items</key>
|
||||
</area>
|
||||
<area alias="propertyActions">
|
||||
<key alias="tooltipForPropertyActionsMenu">Open Property Actions</key>
|
||||
|
||||
Reference in New Issue
Block a user