Monotone-Parent: 9df6e001998902bd5c8999371fe27d0a80a65394

Monotone-Revision: 0f74ed9ee961ab1a0c1f0a7f590156e0a6ad0ccc

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-09-07T13:35:22
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-09-07 13:35:22 +00:00
parent ee8e1e6f18
commit a62fbebbc1

View File

@@ -1089,6 +1089,7 @@ function initMailboxTree() {
mailboxTree.add(0, -1, '');
mailboxTree.pendingRequests = mailAccounts.length;
activeAjaxRequests += mailAccounts.length;
for (var i = 0; i < mailAccounts.length; i++) {
var url = ApplicationBaseURL + "/" + mailAccounts[i] + "/mailboxes";
triggerAjaxRequest(url, onLoadMailboxesCallback, mailAccounts[i]);
@@ -1203,14 +1204,17 @@ function updateMailboxMenus() {
function onLoadMailboxesCallback(http) {
if (http.readyState == 4
&& http.status == 200) {
checkAjaxRequestsState();
var newAccount = buildMailboxes(http.callbackData,
http.responseText);
accounts[http.callbackData] = newAccount;
mailboxTree.addMailAccount(newAccount);
mailboxTree.pendingRequests--;
activeAjaxRequests--;
if (!mailboxTree.pendingRequests) {
updateMailboxTreeInPage();
updateMailboxMenus();
checkAjaxRequestsState();
}
}