1. loading dhmtlx(tree|menu) again via script tag

2. fixed not loaded app.js in egw_json by using import direct and not includeJS (and therefore removed additional include in et2_load)
3. adding cache-buster for egw.js and app.js endpoints to force reloads (not adding them for anything else, as it interferes with rollup
This commit is contained in:
Ralf Becker
2021-07-01 14:36:51 +02:00
parent 7e350f4a4a
commit 8c7722c8b0
7 changed files with 33 additions and 16 deletions

View File

@ -293,7 +293,8 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
if(js_files.length > 0)
{
var start_time = (new Date).getTime();
this.egw.includeJS(js_files, function() {
// for some reason using this.includeJS() does NOT work / app.classes does not get set, before the Promise resolves
Promise.all(js_files.map((file) => import(file))).then(() => {
var end_time = (new Date).getTime();
this.handleResponse(data);
if (egw.preference('show_generation_time', 'common', false) == "1")
@ -304,7 +305,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
gen_time_div.append('<span class="asyncIncludeTime"></span>').find('.asyncIncludeTime');
gen_time_async.text(egw.lang('async includes took %1s', (end_time-start_time)/1000));
}
}, this);
});
return;
}