From 2c46042f0e0dca73dfb7e8c7605ebe0cb753366e Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sun, 11 Oct 2015 22:07:28 +0200 Subject: [PATCH] Fixed js problem with backend calendar ajax error handling. --- src/assets/js/backend_calendar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assets/js/backend_calendar.js b/src/assets/js/backend_calendar.js index f4312f9b..1c39b0f9 100644 --- a/src/assets/js/backend_calendar.js +++ b/src/assets/js/backend_calendar.js @@ -1025,7 +1025,7 @@ var BackendCalendar = { var calendarEvents = []; var $calendar = $('#calendar'); - $.each(response.appointments, function(index, appointment){ + $.each(response.appointments, function(index, appointment) { var event = { 'id': appointment['id'], 'title': appointment['service']['name'] + ' - ' @@ -1038,7 +1038,7 @@ var BackendCalendar = { }; calendarEvents.push(event); - }, 'json').fail(GeneralFunctions.ajaxFailureHandler); + }); $calendar.fullCalendar('removeEvents'); $calendar.fullCalendar('addEventSource', calendarEvents); @@ -1256,7 +1256,7 @@ var BackendCalendar = { // Convert the titles to html code. //BackendCalendar.convertTitlesToHtml(); } - }, 'json'); + }, 'json').fail(GeneralFunction.ajaxFailureHandler); }, /**