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) => {
|
businessSettings.forEach((businessSetting) => {
|
||||||
$('[data-field="' + businessSetting.name + '"]').val(businessSetting.value);
|
$('[data-field="' + businessSetting.name + '"]').val(businessSetting.value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deserialize() {
|
function serialize() {
|
||||||
const businessSettings = [];
|
const businessSettings = [];
|
||||||
|
|
||||||
$('[data-field]').each((index, field) => {
|
$('[data-field]').each((index, field) => {
|
||||||
|
@ -91,7 +91,7 @@ App.Pages.BusinessSettings = (function () {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const businessSettings = deserialize();
|
const businessSettings = serialize();
|
||||||
|
|
||||||
App.Http.BusinessSettings.save(businessSettings).done(() => {
|
App.Http.BusinessSettings.save(businessSettings).done(() => {
|
||||||
Backend.displayNotification(App.Lang.settings_saved);
|
Backend.displayNotification(App.Lang.settings_saved);
|
||||||
|
@ -131,7 +131,7 @@ App.Pages.BusinessSettings = (function () {
|
||||||
function init() {
|
function init() {
|
||||||
const businessSettings = App.Vars.business_settings;
|
const businessSettings = App.Vars.business_settings;
|
||||||
|
|
||||||
serialize(businessSettings);
|
deserialize(businessSettings);
|
||||||
|
|
||||||
let workingPlan = {};
|
let workingPlan = {};
|
||||||
|
|
||||||
|
|
|
@ -50,13 +50,13 @@ App.Pages.GeneralSettings = (function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function serialize(generalSettings) {
|
function deserialize(generalSettings) {
|
||||||
generalSettings.forEach((generalSetting) => {
|
generalSettings.forEach((generalSetting) => {
|
||||||
$('[data-field="' + generalSetting.name + '"]').val(generalSetting.value);
|
$('[data-field="' + generalSetting.name + '"]').val(generalSetting.value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deserialize() {
|
function serialize() {
|
||||||
const generalSettings = [];
|
const generalSettings = [];
|
||||||
|
|
||||||
$('[data-field]').each((index, field) => {
|
$('[data-field]').each((index, field) => {
|
||||||
|
@ -81,7 +81,7 @@ App.Pages.GeneralSettings = (function () {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const generalSettings = deserialize();
|
const generalSettings = serialize();
|
||||||
|
|
||||||
App.Http.GeneralSettings.save(generalSettings).done(() => {
|
App.Http.GeneralSettings.save(generalSettings).done(() => {
|
||||||
Backend.displayNotification(App.Lang.settings_saved);
|
Backend.displayNotification(App.Lang.settings_saved);
|
||||||
|
@ -91,7 +91,7 @@ App.Pages.GeneralSettings = (function () {
|
||||||
function init() {
|
function init() {
|
||||||
const generalSettings = App.Vars.general_settings;
|
const generalSettings = App.Vars.general_settings;
|
||||||
|
|
||||||
serialize(generalSettings);
|
deserialize(generalSettings);
|
||||||
|
|
||||||
$saveSettings.on('click', onSaveSettingsClick);
|
$saveSettings.on('click', onSaveSettingsClick);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue