From 3f2fe3014803bb829427ddf28adf447c86399668 Mon Sep 17 00:00:00 2001 From: alec Date: Thu, 8 Mar 2012 13:04:06 +0000 Subject: - On login screen show only one message at a time git-svn-id: https://svn.roundcube.net/trunk@5988 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/app.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index bd8669b0d..d406844ae 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -431,6 +431,7 @@ function rcube_webmail() // display 'loading' message on form submit, lock submit button $('form').submit(function () { $('input[type=submit]', this).prop('disabled', true); + rcmail.clear_messages(); rcmail.display_message('', 'loading'); }); @@ -5544,6 +5545,23 @@ function rcube_webmail() } }; + // remove all messages immediately + this.clear_messages = function() + { + // pass command to parent window + if (this.is_framed()) + return parent.rcmail.clear_messages(); + + var k, n, m = this.messages; + + for (k in m) + for (n in m[k].elements) + if (m[k].obj) + m[k].obj.hide(); + + this.messages = {}; + }; + // mark a mailbox as selected and set environment variable this.select_folder = function(name, prefix, encode) { -- cgit v1.2.3