summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-08-24 08:30:40 +0000
committeralecpl <alec@alec.pl>2010-08-24 08:30:40 +0000
commit554d79378012abd2d8d3b13e9a94173955809857 (patch)
treecf09a7e4b0f4f608ce88935d25c0000983a55cd6
parent45da0106fb0487a0a168e43172ebdeeb8cdfe75d (diff)
- Fix set_busy() when called from an iframe
-rw-r--r--program/js/app.js15
1 files 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)
{