mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-17 20:11:23 +02:00
Api: Take care of private app.js instances, make sure they're included in iteration.
Iterate over all app.js instances (public & private) using: for (var app_obj of window.EgwApp) {...}
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var et2_core_baseWidget_1 = require("./et2_core_baseWidget");
|
||||
var egw_app_1 = require("../jsapi/egw_app");
|
||||
/**
|
||||
* The etemplate2 class manages a certain etemplate2 instance.
|
||||
*
|
||||
@@ -196,6 +197,14 @@ var etemplate2 = /** @class */ (function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
// If using a private app object, remove all of them
|
||||
if (this.app_obj !== window.app) {
|
||||
for (var app_name in this.app_obj) {
|
||||
if (this.app_obj[app_name] instanceof egw_app_1.EgwApp) {
|
||||
this.app_obj[app_name].destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Object.defineProperty(etemplate2.prototype, "widgetContainer", {
|
||||
get: function () {
|
||||
@@ -383,8 +392,6 @@ var etemplate2 = /** @class */ (function () {
|
||||
app[appname].et2_ready(_et2, _name);
|
||||
};
|
||||
}
|
||||
// Clear any existing instance
|
||||
this.clear();
|
||||
// Create the basic widget container and attach it to the DOM
|
||||
this._widgetContainer = new et2_core_baseWidget_1.et2_container(null);
|
||||
this._widgetContainer.setApiInstance(egw(currentapp, egw.elemWindow(this._DOMContainer)));
|
||||
|
Reference in New Issue
Block a user