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)
|
etemplate2.prototype.resize = function(e)
|
||||||
{
|
{
|
||||||
if (this.widgetContainer)
|
var event = e;
|
||||||
{
|
var self = this;
|
||||||
var appHeader = $j('#divAppboxHeader');
|
setTimeout(function(){
|
||||||
|
if (self.widgetContainer)
|
||||||
//Calculate the excess height
|
{
|
||||||
var excess_height = egw(window).is_popup()? $j(window).height() - $j('.et2_container').height() - appHeader.outerHeight()+10: false;
|
var appHeader = $j('#divAppboxHeader');
|
||||||
|
|
||||||
// Recalculate excess height if the appheader is shown, e.g. mobile framework dialogs
|
//Calculate the excess height
|
||||||
if (appHeader.length > 0 && appHeader.is(':visible')) excess_height -= appHeader.outerHeight()-9;
|
var excess_height = egw(window).is_popup()? $j(window).height() - $j('.et2_container').height() - appHeader.outerHeight()+10: false;
|
||||||
|
|
||||||
if (typeof e != 'undefined' && e.type !== 'resize') excess_height = 0;
|
// 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;
|
||||||
// Call the "resize" event of all functions which implement the
|
|
||||||
// "IResizeable" interface
|
if (typeof event != 'undefined' && event.type !== 'resize') excess_height = 0;
|
||||||
this.widgetContainer.iterateOver(function(_widget) {
|
|
||||||
|
// Call the "resize" event of all functions which implement the
|
||||||
_widget.resize(excess_height);
|
// "IResizeable" interface
|
||||||
}, this, et2_IResizeable);
|
self.widgetContainer.iterateOver(function(_widget) {
|
||||||
}
|
|
||||||
|
_widget.resize(excess_height);
|
||||||
|
}, self, et2_IResizeable);
|
||||||
|
}
|
||||||
|
},100)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user