From 554d79378012abd2d8d3b13e9a94173955809857 Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 24 Aug 2010 08:30:40 +0000 Subject: [PATCH] - Fix set_busy() when called from an iframe --- program/js/app.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 86e6563ca..1e3da6d3b 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1018,11 +1018,13 @@ function rcube_webmail() if (msg == message) msg = 'Loading...'; - if (this.gui_objects.message && this.gui_objects.message.__type != 'error') + // @TODO: show many messages at a time (one below the other ?) + if (this.message_type() != 'error') this.display_message(msg, 'loading', true); } - else if (!a && this.gui_objects.message && this.gui_objects.message.__type != 'error') + else if (!a && this.message_type() != 'error') { this.hide_message(); + } this.busy = a; //document.body.style.cursor = a ? 'wait' : 'default'; @@ -4511,6 +4513,15 @@ function rcube_webmail() $(this.gui_objects.message).unbind()[(fade?'fadeOut':'hide')](); }; + // get type of currently displayed message + this.message_type = function() + { + if (this.gui_objects.message) + return this.gui_objects.message.__type; + else if (this.env.framed && parent.rcmail && parent.rcmail.gui_objects.message) + return parent.rcmail.gui_objects.message.__type; + }; + // mark a mailbox as selected and set environment variable this.select_folder = function(name, old, prefix) {