From f499d02ce1093c42a21997dda4b64e6d03e4c0dd Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Tue, 4 Jun 2013 18:32:26 +0200 Subject: [PATCH] Prevent duplicated requests. see #422 --- modoboa/extensions/webmail/static/webmail/js/webmail.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modoboa/extensions/webmail/static/webmail/js/webmail.js b/modoboa/extensions/webmail/static/webmail/js/webmail.js index 973a81638..42156adaa 100644 --- a/modoboa/extensions/webmail/static/webmail/js/webmail.js +++ b/modoboa/extensions/webmail/static/webmail/js/webmail.js @@ -658,6 +658,7 @@ Webmail.prototype = { if (!msgs.length) { return; } + $link.addClass("disabled"); $.each(msgs, function(idx, item) { var $tr = $(item); selection.push($tr.attr("id")); @@ -884,6 +885,9 @@ Webmail.prototype = { if (data.status == "ok") { var msg = (data.respmsg) ? data.respmsg : gettext("Message deleted"); this.go_back_to_listing(); + if (this.get_current_mailbox() != this.options.trash) { + $("a[name=totrash]").removeClass("disabled"); + } $("body").notify("success", msg, 2000); } else { $("body").notify("error", data.respmsg);