Rename 'ajax' to 'json' because we don't use XML

We use json as response
This commit is contained in:
djmaze 2020-12-30 15:50:47 +01:00
parent 76cf24f426
commit 950579c7f5
18 changed files with 83 additions and 91 deletions

View file

@ -411,10 +411,10 @@ export const Notification = {
ClientViewError: 902,
InvalidInputArgument: 903,
AjaxFalse: 950,
AjaxAbort: 951,
AjaxParse: 952,
AjaxTimeout: 953,
JsonFalse: 950,
JsonAbort: 951,
JsonParse: 952,
// JsonTimeout: 953,
UnknownNotification: 999,
UnknownError: 999

View file

@ -87,7 +87,7 @@ export function settingsSaveHelperSimpleFunction(koTrigger, context) {
}
let __themeTimer = 0,
__themeAjax = null;
__themeJson = null;
/**
* @param {string} value
@ -98,7 +98,7 @@ export function changeTheme(value, themeTrigger = ()=>{}) {
const themeLink = doc.getElementById('app-theme-link'),
clearTimer = () => {
__themeTimer = setTimeout(() => themeTrigger(SaveSettingsStep.Idle), 1000);
__themeAjax = null;
__themeJson = null;
};
let themeStyle = doc.getElementById('app-theme-style'),
@ -118,13 +118,13 @@ export function changeTheme(value, themeTrigger = ()=>{}) {
themeTrigger(SaveSettingsStep.Animate);
if (__themeAjax) {
__themeAjax.abort();
if (__themeJson) {
__themeJson.abort();
}
let init = {};
if (window.AbortController) {
__themeAjax = new AbortController();
init.signal = __themeAjax.signal;
__themeJson = new AbortController();
init.signal = __themeJson.signal;
}
rl.fetchJSON(url, init)
.then(data => {