From 554d79378012abd2d8d3b13e9a94173955809857 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 24 Aug 2010 04:30:40 -0400
Subject: [PATCH] - Fix set_busy() when called from an iframe
---
program/js/app.js | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/program/js/app.js b/program/js/app.js
index 86e6563..1e3da6d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1018,11 +1018,13 @@
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 @@
$(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)
{
--
Gitblit v1.9.1