mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-28 00:39:19 +01:00
Resize the initial resize after everthing is loaded immediately
This commit is contained in:
parent
7116ae34a8
commit
dfe03c8531
@ -110,28 +110,38 @@ etemplate2.prototype.resize = function(e)
|
|||||||
{
|
{
|
||||||
var event = e;
|
var event = e;
|
||||||
var self = this;
|
var self = this;
|
||||||
setTimeout(function(){
|
if (typeof event != 'undefined' && event.type == 'resize')
|
||||||
if (self.widgetContainer)
|
{
|
||||||
{
|
setTimeout(function(){
|
||||||
var appHeader = $j('#divAppboxHeader');
|
if (self.widgetContainer)
|
||||||
|
{
|
||||||
|
var appHeader = $j('#divAppboxHeader');
|
||||||
|
|
||||||
//Calculate the excess height
|
//Calculate the excess height
|
||||||
var excess_height = egw(window).is_popup()? $j(window).height() - $j('.et2_container').height() - appHeader.outerHeight()+10: false;
|
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
|
// 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 (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) {
|
||||||
|
|
||||||
// Call the "resize" event of all functions which implement the
|
_widget.resize(excess_height);
|
||||||
// "IResizeable" interface
|
}, self, et2_IResizeable);
|
||||||
self.widgetContainer.iterateOver(function(_widget) {
|
}
|
||||||
|
},100);
|
||||||
|
}
|
||||||
|
// Initial resize needs to be resized immediately (for instance for nextmatch resize)
|
||||||
|
else if(this.widgetContainer)
|
||||||
|
{
|
||||||
|
// Call the "resize" event of all functions which implement the
|
||||||
|
// "IResizeable" interface
|
||||||
|
this.widgetContainer.iterateOver(function(_widget) {
|
||||||
|
|
||||||
_widget.resize(excess_height);
|
_widget.resize();
|
||||||
}, self, et2_IResizeable);
|
}, this, et2_IResizeable);
|
||||||
}
|
}
|
||||||
},100)
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user