forked from extern/egroupware
Etemplate: Do not bother to resize hidden etemplates
Fixes Admin > App > Site config gets resized incorrectly when switching to another app's tab & back
This commit is contained in:
parent
0d426ae911
commit
3e9794e526
@ -149,12 +149,14 @@ var etemplate2 = /** @class */ (function () {
|
|||||||
// For templates which have sub templates and they are bigger than screenHeight
|
// For templates which have sub templates and they are bigger than screenHeight
|
||||||
if (screen.availHeight < jQuery(self._DOMContainer).height())
|
if (screen.availHeight < jQuery(self._DOMContainer).height())
|
||||||
excess_height = 0;
|
excess_height = 0;
|
||||||
// Call the "resize" event of all functions which implement the
|
// If we're visible, call the "resize" event of all functions which implement the
|
||||||
// "IResizeable" interface
|
// "IResizeable" interface
|
||||||
|
if (jQuery(self.DOMContainer).is(":visible")) {
|
||||||
self._widgetContainer.iterateOver(function (_widget) {
|
self._widgetContainer.iterateOver(function (_widget) {
|
||||||
_widget.resize(excess_height);
|
_widget.resize(excess_height);
|
||||||
}, self, et2_IResizeable);
|
}, self, et2_IResizeable);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
// Initial resize needs to be resized immediately (for instance for nextmatch resize)
|
// Initial resize needs to be resized immediately (for instance for nextmatch resize)
|
||||||
|
@ -197,13 +197,16 @@ export class etemplate2
|
|||||||
// For templates which have sub templates and they are bigger than screenHeight
|
// For templates which have sub templates and they are bigger than screenHeight
|
||||||
if (screen.availHeight < jQuery(self._DOMContainer).height()) excess_height = 0;
|
if (screen.availHeight < jQuery(self._DOMContainer).height()) excess_height = 0;
|
||||||
|
|
||||||
// Call the "resize" event of all functions which implement the
|
// If we're visible, call the "resize" event of all functions which implement the
|
||||||
// "IResizeable" interface
|
// "IResizeable" interface
|
||||||
|
if(jQuery(self.DOMContainer).is(":visible"))
|
||||||
|
{
|
||||||
self._widgetContainer.iterateOver(function (_widget)
|
self._widgetContainer.iterateOver(function (_widget)
|
||||||
{
|
{
|
||||||
_widget.resize(excess_height);
|
_widget.resize(excess_height);
|
||||||
}, self, et2_IResizeable);
|
}, self, et2_IResizeable);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
// Initial resize needs to be resized immediately (for instance for nextmatch resize)
|
// Initial resize needs to be resized immediately (for instance for nextmatch resize)
|
||||||
|
Loading…
Reference in New Issue
Block a user