Fixed js problem with backend calendar ajax error handling.

This commit is contained in:
Alex Tselegidis 2015-10-11 22:07:28 +02:00
parent a24597ba4d
commit 2c46042f0e

View file

@ -1025,7 +1025,7 @@ var BackendCalendar = {
var calendarEvents = []; var calendarEvents = [];
var $calendar = $('#calendar'); var $calendar = $('#calendar');
$.each(response.appointments, function(index, appointment){ $.each(response.appointments, function(index, appointment) {
var event = { var event = {
'id': appointment['id'], 'id': appointment['id'],
'title': appointment['service']['name'] + ' - ' 'title': appointment['service']['name'] + ' - '
@ -1038,7 +1038,7 @@ var BackendCalendar = {
}; };
calendarEvents.push(event); calendarEvents.push(event);
}, 'json').fail(GeneralFunctions.ajaxFailureHandler); });
$calendar.fullCalendar('removeEvents'); $calendar.fullCalendar('removeEvents');
$calendar.fullCalendar('addEventSource', calendarEvents); $calendar.fullCalendar('addEventSource', calendarEvents);
@ -1256,7 +1256,7 @@ var BackendCalendar = {
// Convert the titles to html code. // Convert the titles to html code.
//BackendCalendar.convertTitlesToHtml(); //BackendCalendar.convertTitlesToHtml();
} }
}, 'json'); }, 'json').fail(GeneralFunction.ajaxFailureHandler);
}, },
/** /**