From 5741fca71d539f7f45de712999e6fd69c618b6b3 Mon Sep 17 00:00:00 2001 From: alext Date: Tue, 31 Oct 2017 11:13:53 +0100 Subject: [PATCH] Corrections in the event popovers of the calendar page. --- src/assets/js/backend_calendar_default_view.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/assets/js/backend_calendar_default_view.js b/src/assets/js/backend_calendar_default_view.js index 2da741e0..4d8242c5 100644 --- a/src/assets/js/backend_calendar_default_view.js +++ b/src/assets/js/backend_calendar_default_view.js @@ -96,8 +96,8 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; var unavailable = lastFocusedEventData.data; // Replace string date values with actual date objects. - unavailable.start_datetime = lastFocusedEventData.start.clone(); - unavailable.end_datetime = lastFocusedEventData.end.clone(); + unavailable.start_datetime = lastFocusedEventData.start.format('YYYY-MM-DD HH:mm:ss'); + unavailable.end_datetime = lastFocusedEventData.end.format('YYYY-MM-DD HH:mm:ss'); $dialog = $('#manage-unavailable'); BackendCalendarUnavailabilitiesModal.resetUnavailableDialog(); @@ -268,7 +268,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; var $parent = $(jsEvent.target.offsetParent); var $altParent = $(jsEvent.target).parents().eq(1); - if ($parent.hasClass('fc-unavailable') || $altParent.hasClass('fc-unavailable')) { + if ($(this).hasClass('fc-unavailable') || $parent.hasClass('fc-unavailable') || $altParent.hasClass('fc-unavailable')) { displayEdit = (($parent.hasClass('fc-custom') || $altParent.hasClass('fc-custom')) && GlobalVariables.user.privileges.appointments.edit == true) ? '' : 'hide'; @@ -287,10 +287,10 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; + '.popover-content button {margin-right: 10px;}' + '' + '' + EALang.start + ' ' - + GeneralFunctions.formatDate(event.start, GlobalVariables.dateFormat, true) + + GeneralFunctions.formatDate(event.start.format('YYYY-MM-DD HH:mm:ss'), GlobalVariables.dateFormat, true) + '
' + '' + EALang.end + ' ' - + GeneralFunctions.formatDate(event.end, GlobalVariables.dateFormat, true) + + GeneralFunctions.formatDate(event.end.format('YYYY-MM-DD HH:mm:ss'), GlobalVariables.dateFormat, true) + '
' + notes + '
' + @@ -311,10 +311,10 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; + '.popover-content button {margin-right: 10px;}' + '' + '' + EALang.start + ' ' - + GeneralFunctions.formatDate(event.start, GlobalVariables.dateFormat, true) + + GeneralFunctions.formatDate(event.start.format('YYYY-MM-DD HH:mm:ss'), GlobalVariables.dateFormat, true) + '
' + '' + EALang.end + ' ' - + GeneralFunctions.formatDate(event.end, GlobalVariables.dateFormat, true) + + GeneralFunctions.formatDate(event.end.format('YYYY-MM-DD HH:mm:ss'), GlobalVariables.dateFormat, true) + '
' + '' + EALang.service + ' ' + event.data.service.name