Prevent double opening.

This commit is contained in:
Antoine Nguyen
2013-06-18 19:12:09 +02:00
parent 80bd7f5d51
commit e5e2bc445c
@@ -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);