From ff0cdf814305ef3b85ced801feb0e4c5c275ce33 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 4 Jun 2020 17:04:14 +0200 Subject: [PATCH] set id of DOMContainer, in case it changed because server-side send a different template --- api/js/etemplate/etemplate2.js | 2 ++ api/js/etemplate/etemplate2.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/api/js/etemplate/etemplate2.js b/api/js/etemplate/etemplate2.js index da0eac1674..c7d1a8cd9c 100644 --- a/api/js/etemplate/etemplate2.js +++ b/api/js/etemplate/etemplate2.js @@ -398,6 +398,8 @@ var etemplate2 = /** @class */ (function () { this._widgetContainer.setApiInstance(egw(currentapp, egw.elemWindow(this._DOMContainer))); this._widgetContainer.setInstanceManager(this); this._widgetContainer.setParentDOMNode(this._DOMContainer); + // set id of DOMContainer, in case it changed because server-side send a different template + this._DOMContainer.id = this.uniqueId = _name.replace(/\./g, '-'); // store the id to submit it back to server if (_data) { this._etemplate_exec_id = _data.etemplate_exec_id; diff --git a/api/js/etemplate/etemplate2.ts b/api/js/etemplate/etemplate2.ts index 82c67e4cac..9a7d3366d5 100644 --- a/api/js/etemplate/etemplate2.ts +++ b/api/js/etemplate/etemplate2.ts @@ -506,6 +506,9 @@ export class etemplate2 this._widgetContainer.setInstanceManager(this); this._widgetContainer.setParentDOMNode(this._DOMContainer); + // set id of DOMContainer, in case it changed because server-side send a different template + this._DOMContainer.id = this.uniqueId = _name.replace(/\./g, '-'); + // store the id to submit it back to server if (_data) {