From 5e151a621082bdf9f519b3a3f8f0cc42006bda78 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 21 May 2021 12:23:16 +0200 Subject: [PATCH] export hbox widget and mark parameter in getDOMNode() optional --- api/js/etemplate/et2_widget_hbox.js | 5 ++++- api/js/etemplate/et2_widget_hbox.ts | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api/js/etemplate/et2_widget_hbox.js b/api/js/etemplate/et2_widget_hbox.js index e7ac66297e..798d6b55b7 100644 --- a/api/js/etemplate/et2_widget_hbox.js +++ b/api/js/etemplate/et2_widget_hbox.js @@ -22,6 +22,7 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); +exports.et2_hbox = void 0; /*egw:uses /vendor/bower-asset/jquery/dist/jquery.js; et2_core_baseWidget; @@ -29,6 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var et2_core_inheritance_1 = require("./et2_core_inheritance"); var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_baseWidget_1 = require("./et2_core_baseWidget"); +var et2_widget_grid_1 = require("./et2_widget_grid"); /** * Class which implements hbox tag * @@ -162,11 +164,12 @@ var et2_hbox = /** @class */ (function (_super) { */ et2_hbox.prototype.addChild = function (child) { _super.prototype.addChild.call(this, child); - if (child.instanceOf && child.instanceOf(et2_grid) && this.isAttached() || child._type == 'et2_grid' && this.isAttached()) { + if (child.instanceOf && child.instanceOf(et2_widget_grid_1.et2_grid) && this.isAttached() || child._type == 'et2_grid' && this.isAttached()) { jQuery(child.getDOMNode(child)).css("display", "inline-table"); } }; return et2_hbox; }(et2_core_baseWidget_1.et2_baseWidget)); +exports.et2_hbox = et2_hbox; et2_core_widget_1.et2_register_widget(et2_hbox, ["hbox"]); //# sourceMappingURL=et2_widget_hbox.js.map \ No newline at end of file diff --git a/api/js/etemplate/et2_widget_hbox.ts b/api/js/etemplate/et2_widget_hbox.ts index 944564f68c..57d159194b 100644 --- a/api/js/etemplate/et2_widget_hbox.ts +++ b/api/js/etemplate/et2_widget_hbox.ts @@ -14,15 +14,16 @@ */ import {ClassWithAttributes} from "./et2_core_inheritance"; -import {et2_register_widget, WidgetConfig} from "./et2_core_widget"; +import {et2_register_widget, et2_widget, WidgetConfig} from "./et2_core_widget"; import {et2_baseWidget} from "./et2_core_baseWidget"; +import {et2_grid} from "./et2_widget_grid"; /** * Class which implements hbox tag * * @augments et2_baseWidget */ -class et2_hbox extends et2_baseWidget +export class et2_hbox extends et2_baseWidget { alignData : any = { "hasAlign": false, @@ -156,7 +157,7 @@ class et2_hbox extends et2_baseWidget super.assign(_obj); } - getDOMNode(_sender) { + getDOMNode(_sender? : et2_widget) { // Return a special align container if this hbox needs it if (_sender != this && this.alignData.hasAlign) {