From ce394c512d3cba36f208efc2a4df311f106a9e03 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 2 Nov 2007 18:18:15 +0000 Subject: [PATCH 1/2] Monotone-Parent: 481fe3d5a9c50bc134e3db63b08e84fc0a7456fd Monotone-Revision: a9a815362cf2b8cfa777d0a89799463ee2302535 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-11-02T18:18:15 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/UIxMailEditor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index 080528170..2c8b26b77 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -30,7 +30,7 @@ function addContact(tag, fullContactName, contactId, contactName, contactEmail) var counter = 0; var currentRow = $('row_' + counter); while (currentRow && !stop) { - var currentValue = $(currentRow.childNodesWithTag("span")[1]).childNodesWithTag("input")[0].value; + var currentValue = $(currentRow.childNodesWithTag("td")[1]).childNodesWithTag("input")[0].value; if (currentValue == neededOptionValue) { stop = true; insertContact($("addr_" + counter), contactName, contactEmail); @@ -41,9 +41,10 @@ function addContact(tag, fullContactName, contactId, contactName, contactEmail) if (!stop) { fancyAddRow(false, ""); - $("row_" + counter).childNodesWithTag("span")[0].childNodesWithTag("select")[0].value + $($("row_" + counter).childNodesWithTag("td")[0]).childNodesWithTag("select")[0].value = neededOptionValue; insertContact($("addr_" + counter), contactName, contactEmail); + onWindowResize(null); } } } From ad53fa58126183565bfe8e31c71db72fd7a1ae7a Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 2 Nov 2007 18:56:24 +0000 Subject: [PATCH 2/2] Monotone-Parent: a9a815362cf2b8cfa777d0a89799463ee2302535 Monotone-Revision: ed40a4a9e9d163d3485ee9181074ef26215a9f2e Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-11-02T18:56:24 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/MailerUI.js | 32 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index adbf3bbd4..801e05903 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -523,10 +523,12 @@ function quotasCallback(http) { && http.status == 200) { var hasQuotas = false; - var quotas = http.responseText.evalJSON(true); - for (var i in quotas) { - hasQuotas = true; - break; + if (http.responseText.length > 0) { + var quotas = http.responseText.evalJSON(true); + for (var i in quotas) { + hasQuotas = true; + break; + } } if (hasQuotas) { @@ -1279,16 +1281,18 @@ 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(); + if (http.responseText.length > 0) { + var newAccount = buildMailboxes(http.callbackData, + http.responseText); + accounts[http.callbackData] = newAccount; + mailboxTree.addMailAccount(newAccount); + mailboxTree.pendingRequests--; + activeAjaxRequests--; + if (!mailboxTree.pendingRequests) { + updateMailboxTreeInPage(); + updateMailboxMenus(); + checkAjaxRequestsState(); + } } }