From 95e9f54c8f2619cb859a9488195fcd7e1f19ca40 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Fri, 2 Nov 2007 19:12:20 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1224 d1b88da0-ebda-0310-925b-ed51d893ca5b --- UI/WebServerResources/MailerUI.js | 25 +++++++++++++------------ UI/WebServerResources/UIxMailEditor.js | 5 +++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index 33015ac3..476804a0 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -6,7 +6,7 @@ if (typeof textMailAccounts != 'undefined') { if (textMailAccounts.length > 0) mailAccounts = textMailAccounts.evalJSON(true); else - mailAccounts = new Array; + mailAccounts = new Array(); } var currentMessages = new Array(); @@ -527,7 +527,6 @@ function quotasCallback(http) { && http.status == 200) { var hasQuotas = false; - if (http.responseText.length > 0) { var quotas = http.responseText.evalJSON(true); for (var i in quotas) { hasQuotas = true; @@ -1285,16 +1284,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(); + } } } diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index 08052817..2c8b26b7 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); } } } -- 2.39.5