From 5ac188f0a7e006cb30ffaf039e5326739c5463bd Mon Sep 17 00:00:00 2001 From: alecpl Date: Mon, 30 Aug 2010 16:28:26 +0000 Subject: - Fix hide_message() to work when called from an iframe --- program/js/app.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'program/js/app.js') 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; } }; -- cgit v1.2.3