summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-08-30 16:28:26 +0000
committeralecpl <alec@alec.pl>2010-08-30 16:28:26 +0000
commit5ac188f0a7e006cb30ffaf039e5326739c5463bd (patch)
tree1768658955b1ea2a97fca4292482736b61062dca /program/js
parent33bfe1c9dc4ae0f67e458263e25042abb747f389 (diff)
- Fix hide_message() to work when called from an iframe
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 7df194253..48e05f44f 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -4516,9 +4516,15 @@ function rcube_webmail()
// make a message row disapear
this.hide_message = function(fade)
{
- if (this.gui_objects.message) {
- $(this.gui_objects.message).unbind()[(fade?'fadeOut':'hide')]();
- this.gui_objects.message.__type = null;
+ var msg;
+ if (this.gui_objects.message)
+ msg = this.gui_objects.message;
+ else if (this.env.framed && parent.rcmail)
+ msg = parent.rcmail.gui_objects.message;
+
+ if (msg) {
+ $(msg).unbind()[(fade?'fadeOut':'hide')]();
+ msg.__type = null;
}
};