diff --git a/modoboa/extensions/webmail/static/webmail/js/webmail.js b/modoboa/extensions/webmail/static/webmail/js/webmail.js index 42156adaa..e84e2e8ef 100644 --- a/modoboa/extensions/webmail/static/webmail/js/webmail.js +++ b/modoboa/extensions/webmail/static/webmail/js/webmail.js @@ -256,18 +256,6 @@ Webmail.prototype = { return "mboxes=" + res.join(","); }, - /* - * Sends a refresh request to the server. This method is called - * periodically to check for new messages. (not really optimized) - */ - update_unseen_messages: function(mailbox) { - $.ajax({ - url: this.options.poller_url + "?selection=" + mailbox, - dataType: 'json', - success: $.proxy(this.poller_cb, this) - }); - }, - /* * Poller callback. */ @@ -761,6 +749,10 @@ Webmail.prototype = { var curmb = this.get_current_mailbox(); e.preventDefault(); + if ($tr.hasClass("disabled")) { + return; + } + $tr.addClass("disabled"); if ($tr.hasClass("unseen")) { var mb = this.get_current_mailbox(); this.change_unseen_messages(mb, -1);