diff --git a/api/js/etemplate/Layout/Et2Split/Et2Split.ts b/api/js/etemplate/Layout/Et2Split/Et2Split.ts index d373913910..c77f79fd18 100644 --- a/api/js/etemplate/Layout/Et2Split/Et2Split.ts +++ b/api/js/etemplate/Layout/Et2Split/Et2Split.ts @@ -321,7 +321,10 @@ export class Et2Split extends Et2Widget(SlotMixin(SlSplitPanel)) // Tell widgets that manually resize about it this.iterateOver(function(_widget) { - _widget.resize(); + if (typeof _widget.resize === 'function') + { + _widget.resize(); + } }, self, et2_IResizeable); }.bind(this), 100); } diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 9220be523c..5ccebc0cb5 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -1731,7 +1731,10 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 // Allow column widgets a chance to resize self.iterateOver(function(widget) { - widget.resize(); + if (typeof widget.resize === 'function') + { + widget.resize(); + } }, self, et2_IResizeable); }; @@ -2191,7 +2194,10 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 // Allow column widgets a chance to resize this.iterateOver(function(widget) { - widget.resize(); + if (typeof widget.resize === 'function') + { + widget.resize(); + } }, this, et2_IResizeable); } diff --git a/api/js/etemplate/et2_widget_portlet.ts b/api/js/etemplate/et2_widget_portlet.ts index 9436ef3a5e..f41d059154 100644 --- a/api/js/etemplate/et2_widget_portlet.ts +++ b/api/js/etemplate/et2_widget_portlet.ts @@ -150,7 +150,12 @@ export class et2_portlet extends et2_valueWidget self ); // Tell children - self.iterateOver(function(widget) {widget.resize();},null,et2_IResizeable); + self.iterateOver(function(widget) { + if (typeof widget.resize === 'function') + { + widget.resize(); + } + },null,et2_IResizeable); } }); this.header = jQuery(document.createElement("div")) @@ -330,7 +335,12 @@ export class et2_portlet extends et2_valueWidget { // Tell children try { - this.iterateOver(function(widget) {widget.resize();},null,et2_IResizeable); + this.iterateOver(function(widget) { + if (typeof widget.resize === 'function') + { + widget.resize(); + } + },null,et2_IResizeable); } catch (e) { // Something went wrong, but do not stop egw.debug('warn',e,this); @@ -429,5 +439,4 @@ export class et2_portlet extends et2_valueWidget this.div.css('height',''); } } -et2_register_widget(et2_portlet, ["portlet"]); - +et2_register_widget(et2_portlet, ["portlet"]); \ No newline at end of file diff --git a/api/js/etemplate/etemplate2.ts b/api/js/etemplate/etemplate2.ts index dc4b1b95d7..2b2a6183a8 100644 --- a/api/js/etemplate/etemplate2.ts +++ b/api/js/etemplate/etemplate2.ts @@ -276,7 +276,10 @@ export class etemplate2 { self._widgetContainer.iterateOver(function(_widget) { - _widget.resize(excess_height); + if (typeof _widget.resize === 'function') + { + _widget.resize(excess_height); + } }, self, et2_IResizeable); } } diff --git a/calendar/js/et2_widget_timegrid.ts b/calendar/js/et2_widget_timegrid.ts index 20ee03912a..2b653060f4 100644 --- a/calendar/js/et2_widget_timegrid.ts +++ b/calendar/js/et2_widget_timegrid.ts @@ -943,8 +943,10 @@ export class et2_calendar_timegrid extends et2_calendar_view implements et2_IDet if(this.rowHeight != old_height) { this.iterateOver(function(child) { - if(child === this) return; - child.resize(); + if (child !== this && typeof child.resize === 'function') + { + child.resize(); + } },this, et2_IResizeable); }