[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,14 +174,21 @@ namespace _dali.widgets.calendar_edit
)
// remove
.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"),
"procedure": async (get_value, get_representation) => {
const value : _dali.type_calendar_object = await get_value();
this.action_remove(value);
if (! window.confirm(lib_plankton.translate.get("common.confirm_deletion")))
{
// do nothing
}
else
{
const value : _dali.type_calendar_object = await get_value();
this.action_remove(value);
}
}
},
]

View file

@ -256,14 +256,21 @@ namespace _dali.widgets.event_edit
)
// remove
.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"),
"procedure": async (get_value, get_representation) => {
const value : type_value = await get_value();
this.action_remove(value);
if (! window.confirm(lib_plankton.translate.get("common.confirm_deletion")))
{
// do nothing
}
else
{
const value : type_value = await get_value();
this.action_remove(value);
}
}
},
]