fix errors loading stylite/EPL object

This commit is contained in:
Ralf Becker 2021-06-15 13:19:56 +02:00
parent 2388970002
commit 3f1653bff8
2 changed files with 4 additions and 7 deletions

View File

@ -638,10 +638,9 @@ class InfologApp extends EgwApp {
// use app object from etemplate2, which might be private and not just window.app // use app object from etemplate2, which might be private and not just window.app
var app = this.et2.getInstanceManager().app_obj; var app = this.et2.getInstanceManager().app_obj;
if (!app.stylite) { if (!app.stylite) {
var self = this; this.egw.includeJS('/stylite/js/app.js', undefined, undefined, egw.webserverUrl).then(() => {
egw.includeJS('/stylite/js/app.js?' + this.et2.getArrayMgr('content').getEntry('encryption_ts'), undefined, undefined, egw.webserverUrl).then(() => {
app.stylite = new app.classes.stylite; app.stylite = new app.classes.stylite;
app.stylite.et2 = self.et2; app.stylite.et2 = this.et2;
if (callback) { if (callback) {
callback.apply(app.stylite, attrs); callback.apply(app.stylite, attrs);
} }

View File

@ -778,12 +778,10 @@ class InfologApp extends EgwApp
if (!app.stylite) if (!app.stylite)
{ {
var self = this; this.egw.includeJS('/stylite/js/app.js', undefined, undefined, egw.webserverUrl).then(() =>
egw.includeJS('/stylite/js/app.js?'+this.et2.getArrayMgr('content').getEntry('encryption_ts'),
undefined, undefined, egw.webserverUrl).then(() =>
{ {
app.stylite = new app.classes.stylite; app.stylite = new app.classes.stylite;
app.stylite.et2 = self.et2; app.stylite.et2 = this.et2;
if(callback) if(callback)
{ {
callback.apply(app.stylite,attrs); callback.apply(app.stylite,attrs);