mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Prevent double opening.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user