mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
N°6446 Prevent loaded js file constant from being missing if an ajax call is made from a page that's not a Webpage
This commit is contained in:
@@ -62,6 +62,26 @@
|
|||||||
* ]
|
* ]
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// If these constants aren't defined by the main page, define them (global) ourselves
|
||||||
|
if (typeof aLoadedJsFilesRegister === "undefined") {
|
||||||
|
Object.defineProperty(window, "aLoadedJsFilesRegister", {
|
||||||
|
value: new Map(),
|
||||||
|
writable: false,
|
||||||
|
configurable: false,
|
||||||
|
enumerable: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof aLoadedJsFilesResolveCallbacks === "undefined") {
|
||||||
|
Object.defineProperty(window, "aLoadedJsFilesResolveCallbacks", {
|
||||||
|
value: new Map(),
|
||||||
|
writable: false,
|
||||||
|
configurable: false,
|
||||||
|
enumerable: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let aJsFilesToLoad = [];
|
let aJsFilesToLoad = [];
|
||||||
/**
|
/**
|
||||||
* @type {Array} aJsFilesToLoadByOtherRequests Files required by the current \AjaxPage but that are already being handled by another request (done or ongoing)
|
* @type {Array} aJsFilesToLoadByOtherRequests Files required by the current \AjaxPage but that are already being handled by another request (done or ongoing)
|
||||||
|
|||||||
Reference in New Issue
Block a user