diff --git a/application/views/backend/calendar.php b/application/views/backend/calendar.php index 82c23e3e..d59b2a26 100755 --- a/application/views/backend/calendar.php +++ b/application/views/backend/calendar.php @@ -329,9 +329,9 @@
@@ -395,9 +395,9 @@ @@ -456,8 +456,8 @@ @@ -480,8 +480,8 @@ diff --git a/assets/js/backend_calendar_default_view.js b/assets/js/backend_calendar_default_view.js index bad9ef7c..258ceb9f 100755 --- a/assets/js/backend_calendar_default_view.js +++ b/assets/js/backend_calendar_default_view.js @@ -161,6 +161,12 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; } else if (lastFocusedEventData.data.is_unavailable === '0') { var buttons = [ + { + text: EALang.cancel, + click: function () { + $('#message-box').dialog('close'); + } + }, { text: 'OK', click: function () { @@ -181,12 +187,6 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; }) .fail(GeneralFunctions.ajaxFailureHandler); } - }, - { - text: EALang.cancel, - click: function () { - $('#message-box').dialog('close'); - } } ]; @@ -197,7 +197,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; $('', { 'class': 'form-control w-100', 'id': 'delete-reason', - 'rows': '3', + 'rows': '3' }) .appendTo('#message-box'); } else { diff --git a/assets/js/backend_calendar_extra_periods_modal.js b/assets/js/backend_calendar_extra_periods_modal.js index f491bbb1..62bcebc1 100644 --- a/assets/js/backend_calendar_extra_periods_modal.js +++ b/assets/js/backend_calendar_extra_periods_modal.js @@ -84,9 +84,6 @@ window.BackendCalendarExtraPeriodsModal = window.BackendCalendarExtraPeriodsModa }; var errorCallback = function (jqXHR, textStatus, errorThrown) { - GeneralFunctions.displayMessageBox('Communication Error', 'Unfortunately ' + - 'the operation could not complete due to server communication errors.'); - $dialog.find('.modal-message').text(EALang.service_communication_error); $dialog.find('.modal-message').addClass('alert-danger').removeClass('hidden'); }; diff --git a/assets/js/backend_calendar_table_view.js b/assets/js/backend_calendar_table_view.js index da8354c4..5f3b0869 100755 --- a/assets/js/backend_calendar_table_view.js +++ b/assets/js/backend_calendar_table_view.js @@ -238,6 +238,12 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; .fail(GeneralFunctions.ajaxFailureHandler); } else if (lastFocusedEventData.data.is_unavailable === '0') { var buttons = [ + { + text: EALang.cancel, + click: function () { + $('#message-box').dialog('close'); + } + }, { text: 'OK', click: function () { @@ -258,12 +264,6 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; }) .fail(GeneralFunctions.ajaxFailureHandler); } - }, - { - text: EALang.cancel, - click: function () { - $('#message-box').dialog('close'); - } } ]; diff --git a/assets/js/backend_categories_helper.js b/assets/js/backend_categories_helper.js index c3106d05..206d9701 100644 --- a/assets/js/backend_categories_helper.js +++ b/assets/js/backend_categories_helper.js @@ -106,6 +106,12 @@ var categoryId = $('#category-id').val(); var buttons = [ + { + text: EALang.cancel, + click: function () { + $('#message-box').dialog('close'); + } + }, { text: EALang.delete, click: function () { @@ -113,12 +119,6 @@ $('#message-box').dialog('close'); } }, - { - text: EALang.cancel, - click: function () { - $('#message-box').dialog('close'); - } - } ]; GeneralFunctions.displayMessageBox(EALang.delete_category, diff --git a/assets/js/backend_customers_helper.js b/assets/js/backend_customers_helper.js index acdba92a..21fb676f 100644 --- a/assets/js/backend_customers_helper.js +++ b/assets/js/backend_customers_helper.js @@ -170,15 +170,15 @@ var customerId = $('#customer-id').val(); var buttons = [ { - text: EALang.delete, + text: EALang.cancel, click: function () { - instance.delete(customerId); $('#message-box').dialog('close'); } }, { - text: EALang.cancel, + text: EALang.delete, click: function () { + instance.delete(customerId); $('#message-box').dialog('close'); } } diff --git a/assets/js/backend_services_helper.js b/assets/js/backend_services_helper.js index 61128380..aa9a5ad0 100644 --- a/assets/js/backend_services_helper.js +++ b/assets/js/backend_services_helper.js @@ -169,15 +169,15 @@ var serviceId = $('#service-id').val(); var buttons = [ { - text: EALang.delete, + text: EALang.cancel, click: function () { - instance.delete(serviceId); $('#message-box').dialog('close'); } }, { - text: EALang.cancel, + text: EALang.delete, click: function () { + instance.delete(serviceId); $('#message-box').dialog('close'); } } diff --git a/assets/js/backend_settings.js b/assets/js/backend_settings.js index 4c4ce1ba..dcc7db8b 100644 --- a/assets/js/backend_settings.js +++ b/assets/js/backend_settings.js @@ -243,6 +243,12 @@ window.BackendSettings = window.BackendSettings || {}; */ $('#apply-global-working-plan').on('click', function() { var buttons = [ + { + text: EALang.cancel, + click: function() { + $('#message-box').dialog('close'); + } + }, { text: 'OK', click: function() { @@ -262,12 +268,6 @@ window.BackendSettings = window.BackendSettings || {}; $('#message-box').dialog('close'); }); } - }, - { - text: EALang.cancel, - click: function() { - $('#message-box').dialog('close'); - } } ]; diff --git a/assets/js/backend_users_admins.js b/assets/js/backend_users_admins.js index 5367ef7c..258d3cff 100644 --- a/assets/js/backend_users_admins.js +++ b/assets/js/backend_users_admins.js @@ -110,23 +110,22 @@ var adminId = $('#admin-id').val(); var buttons = [ + { + text: EALang.cancel, + click: function () { + $('#message-box').dialog('close'); + } + }, { text: EALang.delete, click: function () { this.delete(adminId); $('#message-box').dialog('close'); }.bind(this) - }, - { - text: EALang.cancel, - click: function () { - $('#message-box').dialog('close'); - } } ]; - GeneralFunctions.displayMessageBox(EALang.delete_admin, - EALang.delete_record_prompt, buttons); + GeneralFunctions.displayMessageBox(EALang.delete_admin, EALang.delete_record_prompt, buttons); }.bind(this)); /** diff --git a/assets/js/backend_users_providers.js b/assets/js/backend_users_providers.js index a5e70581..3c7b6b62 100755 --- a/assets/js/backend_users_providers.js +++ b/assets/js/backend_users_providers.js @@ -121,23 +121,22 @@ var providerId = $('#provider-id').val(); var buttons = [ + { + text: EALang.cancel, + click: function () { + $('#message-box').dialog('close'); + } + }, { text: EALang.delete, click: function () { this.delete(providerId); $('#message-box').dialog('close'); }.bind(this) - }, - { - text: EALang.cancel, - click: function () { - $('#message-box').dialog('close'); - } } ]; - GeneralFunctions.displayMessageBox(EALang.delete_provider, - EALang.delete_record_prompt, buttons); + GeneralFunctions.displayMessageBox(EALang.delete_provider, EALang.delete_record_prompt, buttons); }.bind(this)); /** diff --git a/assets/js/backend_users_secretaries.js b/assets/js/backend_users_secretaries.js index 0ff3bff9..fa57f13d 100644 --- a/assets/js/backend_users_secretaries.js +++ b/assets/js/backend_users_secretaries.js @@ -115,18 +115,18 @@ $('#secretaries').on('click', '#delete-secretary', function () { var secretaryId = $('#secretary-id').val(); var buttons = [ + { + text: EALang.cancel, + click: function () { + $('#message-box').dialog('close'); + } + }, { text: EALang.delete, click: function () { this.delete(secretaryId); $('#message-box').dialog('close'); }.bind(this) - }, - { - text: EALang.cancel, - click: function () { - $('#message-box').dialog('close'); - } } ];