From 0324a3e464510740244ba2f7f8c01f91f278731e Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 30 Sep 2020 14:35:46 +0300 Subject: [PATCH] Removed the unnecessary modal-close event handler --- assets/js/backend_calendar_appointments_modal.js | 9 --------- assets/js/backend_calendar_google_sync.js | 7 ------- assets/js/backend_calendar_unavailabilities_modal.js | 11 +---------- 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/assets/js/backend_calendar_appointments_modal.js b/assets/js/backend_calendar_appointments_modal.js index 1c68f41d..645e07cf 100755 --- a/assets/js/backend_calendar_appointments_modal.js +++ b/assets/js/backend_calendar_appointments_modal.js @@ -35,15 +35,6 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa } function bindEventHandlers() { - /** - * Event: Manage Appointments Dialog Cancel Button "Click" - * - * Closes the dialog without saving any changes to the database. - */ - $('#manage-appointment #cancel-appointment').on('click', function () { - $('#manage-appointment').modal('hide'); - }); - /** * Event: Manage Appointments Dialog Save Button "Click" * diff --git a/assets/js/backend_calendar_google_sync.js b/assets/js/backend_calendar_google_sync.js index 4e221712..149b937a 100644 --- a/assets/js/backend_calendar_google_sync.js +++ b/assets/js/backend_calendar_google_sync.js @@ -129,13 +129,6 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {}; .fail(GeneralFunctions.ajaxFailureHandler); }); - /** - * Event: Close Google Calendar "Click" - */ - $('#close-calendar').on('click', function () { - $('#select-google-calendar').modal('hide'); - }); - /** * Event: Google Sync Button "Click" * diff --git a/assets/js/backend_calendar_unavailabilities_modal.js b/assets/js/backend_calendar_unavailabilities_modal.js index ca16efa2..164f0b82 100755 --- a/assets/js/backend_calendar_unavailabilities_modal.js +++ b/assets/js/backend_calendar_unavailabilities_modal.js @@ -81,16 +81,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili $('#select-filter-item').trigger('change'); }; - BackendCalendarApi.saveUnavailable(unavailable, successCallback, GeneralFunctions.ajaxFailureHandler); - }); - - /** - * Event: Manage Unavailable Dialog Cancel Button "Click" - * - * Closes the dialog without saveing any changes to the database. - */ - $('#manage-unavailable #cancel-unavailable').on('click', function () { - $('#manage-unavailable').modal('hide'); + BackendCalendarApi.saveUnavailable(unavailable, successCallback, null); }); /**