forked from extern/egroupware
Set a timeout to window resizer to make sure this happens after other resize events, hopefully fixes the timing issue
This commit is contained in:
parent
a8e413c330
commit
0607b60bc9
@ -108,25 +108,30 @@ etemplate2.prototype.templates = {};
|
||||
*/
|
||||
etemplate2.prototype.resize = function(e)
|
||||
{
|
||||
if (this.widgetContainer)
|
||||
{
|
||||
var appHeader = $j('#divAppboxHeader');
|
||||
|
||||
//Calculate the excess height
|
||||
var excess_height = egw(window).is_popup()? $j(window).height() - $j('.et2_container').height() - appHeader.outerHeight()+10: false;
|
||||
|
||||
// Recalculate excess height if the appheader is shown, e.g. mobile framework dialogs
|
||||
if (appHeader.length > 0 && appHeader.is(':visible')) excess_height -= appHeader.outerHeight()-9;
|
||||
|
||||
if (typeof e != 'undefined' && e.type !== 'resize') excess_height = 0;
|
||||
|
||||
// Call the "resize" event of all functions which implement the
|
||||
// "IResizeable" interface
|
||||
this.widgetContainer.iterateOver(function(_widget) {
|
||||
|
||||
_widget.resize(excess_height);
|
||||
}, this, et2_IResizeable);
|
||||
}
|
||||
var event = e;
|
||||
var self = this;
|
||||
setTimeout(function(){
|
||||
if (self.widgetContainer)
|
||||
{
|
||||
var appHeader = $j('#divAppboxHeader');
|
||||
|
||||
//Calculate the excess height
|
||||
var excess_height = egw(window).is_popup()? $j(window).height() - $j('.et2_container').height() - appHeader.outerHeight()+10: false;
|
||||
|
||||
// Recalculate excess height if the appheader is shown, e.g. mobile framework dialogs
|
||||
if (appHeader.length > 0 && appHeader.is(':visible')) excess_height -= appHeader.outerHeight()-9;
|
||||
|
||||
if (typeof event != 'undefined' && event.type !== 'resize') excess_height = 0;
|
||||
|
||||
// Call the "resize" event of all functions which implement the
|
||||
// "IResizeable" interface
|
||||
self.widgetContainer.iterateOver(function(_widget) {
|
||||
|
||||
_widget.resize(excess_height);
|
||||
}, self, et2_IResizeable);
|
||||
}
|
||||
},100)
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user