From aa71d8afaddeb085da70636b3ba93fa13d55e7ae Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 24 Jan 2022 14:11:15 +0100 Subject: [PATCH] Change the call-to-action message button to "delete" instead of "ok". --- assets/js/utils/calendar_default_view.js | 6 +++--- assets/js/utils/calendar_table_view.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/utils/calendar_default_view.js b/assets/js/utils/calendar_default_view.js index dcd93abf..4a723ae1 100755 --- a/assets/js/utils/calendar_default_view.js +++ b/assets/js/utils/calendar_default_view.js @@ -226,7 +226,7 @@ App.Utils.CalendarDefaultView = (function () { } }, { - text: 'OK', + text: lang('delete'), click: () => { const appointmentId = lastFocusedEventData.extendedProps.data.id; @@ -360,7 +360,7 @@ App.Utils.CalendarDefaultView = (function () { if ($target.hasClass('fc-unavailability')) { displayEdit = - $target.hasClass('fc-custom') && vars('privileges').appointments.edit === true ? 'me-2' : 'd-none'; + $target.hasClass('fc-custom') && vars('privileges').appointments.edit === true ? '' : 'd-none'; displayDelete = $target.hasClass('fc-custom') && vars('privileges').appointments.delete === true ? 'me-2' : 'd-none'; // Same value at the time. @@ -547,7 +547,7 @@ App.Utils.CalendarDefaultView = (function () { ] }); } else { - displayEdit = vars('privileges').appointments.edit === true ? 'me-2' : 'd-none'; + displayEdit = vars('privileges').appointments.edit === true ? '' : 'd-none'; displayDelete = vars('privileges').appointments.delete === true ? 'me-2' : 'd-none'; $html = $('
', { diff --git a/assets/js/utils/calendar_table_view.js b/assets/js/utils/calendar_table_view.js index cb4c56b9..4c3942aa 100755 --- a/assets/js/utils/calendar_table_view.js +++ b/assets/js/utils/calendar_table_view.js @@ -291,7 +291,7 @@ App.Utils.CalendarTableView = (function () { } }, { - text: 'OK', + text: lang('delete'), click: () => { const appointmentId = lastFocusedEventData.extendedProps.data.id;