[add] Lösch-Bestätigung für Kalender und Termine

This commit is contained in:
fenris 2025-10-20 13:14:56 +02:00
parent 9f0f6808b2
commit d8d15b03ac
2 changed files with 20 additions and 6 deletions

View file

@ -174,15 +174,22 @@ namespace _dali.widgets.calendar_edit
) )
// remove // remove
.concat( .concat(
((! this.read_only) && (! (this.action_change === null))) ((! this.read_only) && (! (this.action_remove === null)))
? ?
[ [
{ {
"label": lib_plankton.translate.get("widget.calendar_edit.actions.remove"), "label": lib_plankton.translate.get("widget.calendar_edit.actions.remove"),
"procedure": async (get_value, get_representation) => { "procedure": async (get_value, get_representation) => {
if (! window.confirm(lib_plankton.translate.get("common.confirm_deletion")))
{
// do nothing
}
else
{
const value : _dali.type_calendar_object = await get_value(); const value : _dali.type_calendar_object = await get_value();
this.action_remove(value); this.action_remove(value);
} }
}
}, },
] ]
: :

View file

@ -256,15 +256,22 @@ namespace _dali.widgets.event_edit
) )
// remove // remove
.concat( .concat(
((! this.read_only) && (! (this.action_change === null))) ((! this.read_only) && (! (this.action_remove === null)))
? ?
[ [
{ {
"label": lib_plankton.translate.get("widget.event_edit.actions.remove"), "label": lib_plankton.translate.get("widget.event_edit.actions.remove"),
"procedure": async (get_value, get_representation) => { "procedure": async (get_value, get_representation) => {
if (! window.confirm(lib_plankton.translate.get("common.confirm_deletion")))
{
// do nothing
}
else
{
const value : type_value = await get_value(); const value : type_value = await get_value();
this.action_remove(value); this.action_remove(value);
} }
}
}, },
] ]
: :