mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
Use the native JSON.parse method instead of the jQuery variation
This commit is contained in:
parent
17e1f77a69
commit
8fb111190b
2 changed files with 5 additions and 5 deletions
|
@ -181,7 +181,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
var successCallback = function () {
|
var successCallback = function () {
|
||||||
Backend.displayNotification(EALang.working_plan_exception_deleted);
|
Backend.displayNotification(EALang.working_plan_exception_deleted);
|
||||||
|
|
||||||
var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions) || {};
|
var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions) || {};
|
||||||
delete workingPlanExceptions[date];
|
delete workingPlanExceptions[date];
|
||||||
|
|
||||||
for (var index in GlobalVariables.availableProviders) {
|
for (var index in GlobalVariables.availableProviders) {
|
||||||
|
@ -1098,8 +1098,8 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
throw new Error('Provider was not found.');
|
throw new Error('Provider was not found.');
|
||||||
}
|
}
|
||||||
|
|
||||||
var workingPlan = jQuery.parseJSON(provider.settings.working_plan);
|
var workingPlan = JSON.parse(provider.settings.working_plan);
|
||||||
var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions);
|
var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions);
|
||||||
var unavailabilityEvent;
|
var unavailabilityEvent;
|
||||||
var viewStart;
|
var viewStart;
|
||||||
var viewEnd;
|
var viewEnd;
|
||||||
|
|
|
@ -157,7 +157,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
var successCallback = function () {
|
var successCallback = function () {
|
||||||
Backend.displayNotification(EALang.working_plan_exception_saved);
|
Backend.displayNotification(EALang.working_plan_exception_saved);
|
||||||
|
|
||||||
var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions) || {};
|
var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions) || {};
|
||||||
|
|
||||||
workingPlanExceptions[date] = workingPlanException;
|
workingPlanExceptions[date] = workingPlanException;
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
.done(function () {
|
.done(function () {
|
||||||
$('#message-box').dialog('close');
|
$('#message-box').dialog('close');
|
||||||
|
|
||||||
var workingPlanExceptions = jQuery.parseJSON(lastFocusedEventData.data.settings.working_plan_exceptions);
|
var workingPlanExceptions = JSON.parse(lastFocusedEventData.data.settings.working_plan_exceptions);
|
||||||
delete workingPlanExceptions[lastFocusedEventData.start.format('YYYY-MM-DD')];
|
delete workingPlanExceptions[lastFocusedEventData.start.format('YYYY-MM-DD')];
|
||||||
lastFocusedEventData.data.settings.working_plan_exceptions = JSON.stringify(workingPlanExceptions);
|
lastFocusedEventData.data.settings.working_plan_exceptions = JSON.stringify(workingPlanExceptions);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue