From a7d5c6480cdef191b04e71005ffea0e35b84ac24 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sun, 17 Dec 2006 21:28:37 +0000 Subject: Added patch for resizeable preview pane --- program/js/app.js | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'program/js/app.js') diff --git a/program/js/app.js b/program/js/app.js index d47f4278e..4bb261cda 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -26,6 +26,7 @@ function rcube_webmail() this.buttons = new Object(); this.gui_objects = new Object(); this.commands = new Object(); + this.onloads = new Array(); // create public reference to myself rcube_webmail_client = this; @@ -77,13 +78,17 @@ function rcube_webmail() this.buttons[command][this.buttons[command].length] = button_prop; }; - // register a specific gui object this.gui_object = function(name, id) { this.gui_objects[name] = id; }; - + + // execute the given script on load + this.add_onload = function(f) + { + this.onloads[this.onloads.length] = f; + }; // initialize webmail client this.init = function() @@ -101,7 +106,7 @@ function rcube_webmail() // find all registered gui objects for (var n in this.gui_objects) this.gui_objects[n] = rcube_find_object(this.gui_objects[n]); - + // tell parent window that this frame is loaded if (this.env.framed && parent.rcmail && parent.rcmail.set_busy) parent.rcmail.set_busy(false); @@ -293,6 +298,16 @@ function rcube_webmail() // start keep-alive interval this.start_keepalive(); + + + // execute all foreign onload scripts + for (var i=0; i