mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Corrected serialized/deserialize function names
This commit is contained in:
parent
29423647b6
commit
c40f2c7004
2 changed files with 8 additions and 8 deletions
|
@ -53,13 +53,13 @@ App.Pages.BusinessSettings = (function () {
|
|||
}
|
||||
}
|
||||
|
||||
function serialize(businessSettings) {
|
||||
function deserialize(businessSettings) {
|
||||
businessSettings.forEach((businessSetting) => {
|
||||
$('[data-field="' + businessSetting.name + '"]').val(businessSetting.value);
|
||||
});
|
||||
}
|
||||
|
||||
function deserialize() {
|
||||
function serialize() {
|
||||
const businessSettings = [];
|
||||
|
||||
$('[data-field]').each((index, field) => {
|
||||
|
@ -91,7 +91,7 @@ App.Pages.BusinessSettings = (function () {
|
|||
return;
|
||||
}
|
||||
|
||||
const businessSettings = deserialize();
|
||||
const businessSettings = serialize();
|
||||
|
||||
App.Http.BusinessSettings.save(businessSettings).done(() => {
|
||||
Backend.displayNotification(App.Lang.settings_saved);
|
||||
|
@ -131,7 +131,7 @@ App.Pages.BusinessSettings = (function () {
|
|||
function init() {
|
||||
const businessSettings = App.Vars.business_settings;
|
||||
|
||||
serialize(businessSettings);
|
||||
deserialize(businessSettings);
|
||||
|
||||
let workingPlan = {};
|
||||
|
||||
|
|
|
@ -50,13 +50,13 @@ App.Pages.GeneralSettings = (function () {
|
|||
}
|
||||
}
|
||||
|
||||
function serialize(generalSettings) {
|
||||
function deserialize(generalSettings) {
|
||||
generalSettings.forEach((generalSetting) => {
|
||||
$('[data-field="' + generalSetting.name + '"]').val(generalSetting.value);
|
||||
});
|
||||
}
|
||||
|
||||
function deserialize() {
|
||||
function serialize() {
|
||||
const generalSettings = [];
|
||||
|
||||
$('[data-field]').each((index, field) => {
|
||||
|
@ -81,7 +81,7 @@ App.Pages.GeneralSettings = (function () {
|
|||
return;
|
||||
}
|
||||
|
||||
const generalSettings = deserialize();
|
||||
const generalSettings = serialize();
|
||||
|
||||
App.Http.GeneralSettings.save(generalSettings).done(() => {
|
||||
Backend.displayNotification(App.Lang.settings_saved);
|
||||
|
@ -91,7 +91,7 @@ App.Pages.GeneralSettings = (function () {
|
|||
function init() {
|
||||
const generalSettings = App.Vars.general_settings;
|
||||
|
||||
serialize(generalSettings);
|
||||
deserialize(generalSettings);
|
||||
|
||||
$saveSettings.on('click', onSaveSettingsClick);
|
||||
|
||||
|
|
Loading…
Reference in a new issue