mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Defer binding to window resize until after loading is finished.
This commit is contained in:
parent
c7de2d229d
commit
3b57659536
@ -93,9 +93,6 @@ function etemplate2(_container, _menuaction)
|
||||
|
||||
// List of templates (XML) that are known, but not used. Indexed by id.
|
||||
this.templates = {};
|
||||
|
||||
// Connect to the window resize event
|
||||
$j(window).resize(this, function(e) {e.data.resize();});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -118,6 +115,9 @@ etemplate2.prototype.resize = function()
|
||||
*/
|
||||
etemplate2.prototype.clear = function()
|
||||
{
|
||||
// Remove any handlers on window (resize)
|
||||
$j(window).off("."+this.uniqueId);
|
||||
|
||||
if (this.widgetContainer != null)
|
||||
{
|
||||
// Un-register handler
|
||||
@ -289,6 +289,9 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
||||
// Inform the widget tree that it has been successfully loaded.
|
||||
this.widgetContainer.loadingFinished(deferred);
|
||||
|
||||
// Connect to the window resize event
|
||||
$j(window).on("resize."+this.uniqueId, this, function(e) {e.data.resize();});
|
||||
|
||||
// Insert the document fragment to the DOM Container
|
||||
this.DOMContainer.appendChild(frag);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user