Resize the initial resize after everthing is loaded immediately

This commit is contained in:
Hadi Nategh 2014-12-09 11:20:38 +00:00
parent 7116ae34a8
commit dfe03c8531

View File

@ -110,6 +110,8 @@ etemplate2.prototype.resize = function(e)
{
var event = e;
var self = this;
if (typeof event != 'undefined' && event.type == 'resize')
{
setTimeout(function(){
if (self.widgetContainer)
{
@ -121,8 +123,6 @@ etemplate2.prototype.resize = function(e)
// 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) {
@ -130,8 +130,18 @@ etemplate2.prototype.resize = function(e)
_widget.resize(excess_height);
}, self, et2_IResizeable);
}
},100)
},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();
}, this, et2_IResizeable);
}
};
/**