diff --git a/api/js/etemplate/et2_core_baseWidget.js b/api/js/etemplate/et2_core_baseWidget.js index 0c94c9b37e..017622618d 100644 --- a/api/js/etemplate/et2_core_baseWidget.js +++ b/api/js/etemplate/et2_core_baseWidget.js @@ -31,6 +31,7 @@ require("./et2_core_interfaces"); require("./et2_core_common"); var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget"); var et2_core_inheritance_1 = require("./et2_core_inheritance"); +var et2_core_widget_1 = require("./et2_core_widget"); /** * Class which manages the DOM node itself. The simpleWidget class is derrived * from et2_DOMWidget and implements the getDOMNode function. A setDOMNode @@ -273,8 +274,11 @@ var et2_container = /** @class */ (function (_super) { * Constructor */ function et2_container(_parent, _attrs, _child) { + var _this = // Call the inherited constructor - return _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this; + _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this; + _this.setDOMNode(document.createElement("div")); + return _this; } /** * The destroy function destroys all children of the widget, removes itself @@ -295,6 +299,8 @@ var et2_container = /** @class */ (function (_super) { }; return et2_container; }(et2_baseWidget)); +// Register widget for attributes, but not for any xml tags +et2_core_widget_1.et2_register_widget(et2_container, []); /** * Container object for not-yet supported widgets * @@ -354,4 +360,6 @@ var et2_placeholder = /** @class */ (function (_super) { }; return et2_placeholder; }(et2_baseWidget)); +// Register widget, but no tags +et2_core_widget_1.et2_register_widget(et2_placeholder, []); //# sourceMappingURL=et2_core_baseWidget.js.map \ No newline at end of file diff --git a/api/js/etemplate/et2_core_baseWidget.ts b/api/js/etemplate/et2_core_baseWidget.ts index 44e6fada90..21feac8761 100644 --- a/api/js/etemplate/et2_core_baseWidget.ts +++ b/api/js/etemplate/et2_core_baseWidget.ts @@ -18,7 +18,7 @@ import './et2_core_interfaces'; import './et2_core_common'; import {et2_DOMWidget} from './et2_core_DOMWidget'; import {ClassWithAttributes} from "./et2_core_inheritance"; -import {et2_widget, WidgetConfig} from "./et2_core_widget"; +import {et2_register_widget, et2_widget, WidgetConfig} from "./et2_core_widget"; /** * Class which manages the DOM node itself. The simpleWidget class is derrived @@ -337,6 +337,8 @@ class et2_container extends et2_baseWidget { // Call the inherited constructor super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {})); + + this.setDOMNode(document.createElement("div")); } /** @@ -362,6 +364,8 @@ class et2_container extends et2_baseWidget } } } +// Register widget for attributes, but not for any xml tags +et2_register_widget(et2_container, []); /** * Container object for not-yet supported widgets @@ -446,4 +450,5 @@ class et2_placeholder extends et2_baseWidget implements et2_IDetachedDOM this.placeDiv = jQuery(_nodes[0]); } } - +// Register widget, but no tags +et2_register_widget(et2_placeholder, []); diff --git a/api/js/etemplate/et2_core_widget.js b/api/js/etemplate/et2_core_widget.js index d5b3744859..faeb19360a 100644 --- a/api/js/etemplate/et2_core_widget.js +++ b/api/js/etemplate/et2_core_widget.js @@ -37,7 +37,7 @@ var et2_core_inheritance_1 = require("./et2_core_inheritance"); var et2_registry = {}; var et2_attribute_registry = {}; /** - * Registers the widget class defined by the given constructor and associates it + * Registers the widget class defined by the given constructor, registers all its class attributes, and associates it * with the types in the _types array. * * @param {function} _constructor constructor diff --git a/api/js/etemplate/et2_core_widget.ts b/api/js/etemplate/et2_core_widget.ts index d9092ae822..56c3595492 100644 --- a/api/js/etemplate/et2_core_widget.ts +++ b/api/js/etemplate/et2_core_widget.ts @@ -27,7 +27,7 @@ var et2_attribute_registry = {}; /** - * Registers the widget class defined by the given constructor and associates it + * Registers the widget class defined by the given constructor, registers all its class attributes, and associates it * with the types in the _types array. * * @param {function} _constructor constructor diff --git a/api/js/etemplate/et2_widget_box.js b/api/js/etemplate/et2_widget_box.js index 8666aa8df0..48f43af9b2 100644 --- a/api/js/etemplate/et2_widget_box.js +++ b/api/js/etemplate/et2_widget_box.js @@ -30,7 +30,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); */ var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_baseWidget_1 = require("./et2_core_baseWidget"); -var et2_core_xml_1 = require("./et2_core_xml"); /** * Class which implements box and vbox tag * @@ -81,7 +80,7 @@ var et2_box = /** @class */ (function (_super) { continue; } // Create the new element, if no expansion needed - var id = et2_core_xml_1.et2_readAttrWithDefault(node, "id", ""); + var id = et2_readAttrWithDefault(node, "id", ""); if (id.indexOf('$') < 0 || widgetType != 'box') { this.createElementFromNode(node); childIndex++; diff --git a/api/js/etemplate/et2_widget_box.ts b/api/js/etemplate/et2_widget_box.ts index 3c49d9d47a..df79061fab 100644 --- a/api/js/etemplate/et2_widget_box.ts +++ b/api/js/etemplate/et2_widget_box.ts @@ -18,7 +18,6 @@ import {et2_register_widget, WidgetConfig} from "./et2_core_widget"; import {et2_baseWidget} from "./et2_core_baseWidget"; -import {et2_readAttrWithDefault} from './et2_core_xml' /** * Class which implements box and vbox tag