Monotone-Parent: a311d7d0d46a40428355d5d16855425659aafddf

Monotone-Revision: 0dd67af506445aca2871edc97a4383c609e20c42

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2007-12-04T22:47:41
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2007-12-04 22:47:41 +00:00
parent d68bfa6b96
commit bf8acbc6ab
2 changed files with 13 additions and 17 deletions
+9 -7
View File
@@ -98,16 +98,15 @@ function fancyAddRow(shouldEdit, text) {
lastChild = $("lastRow");
currentIndex++;
proto = $('row_' + lastIndex);
proto = lastChild.previous("tr");
row = proto.cloneNode(true);
row.id = 'row_' + currentIndex;
row.setAttribute("id", 'row_' + currentIndex);
// select popup
var rowNodes = row.childNodesWithTag("td");
select = $(rowNodes[0]).childNodesWithTag("select")[0];
select.name = 'popup_' + currentIndex;
// select.value = row.childNodesWithTag("span")[0].childNodesWithTag("select")[0].value;
select.value = proto.down("select").value;
input = $(rowNodes[1]).childNodesWithTag("input")[0];
input.name = 'addr_' + currentIndex;
input.id = 'addr_' + currentIndex;
@@ -136,7 +135,7 @@ function addressFieldGotFocus(sender) {
function addressFieldLostFocus(sender) {
lastIndex = this.getIndexFromIdentifier(sender.id);
return false;
}
@@ -147,7 +146,7 @@ function removeLastEditedRowIfEmpty() {
if (idx == 0) return;
addr = $('addr_' + idx);
if (!addr) return;
if (addr.value != '') return;
if (addr.value.strip() != '') return;
addr = this.findAddressWithIndex(idx);
if(addr) {
var addresses = $('addr_addresses');
@@ -223,5 +222,8 @@ function hasRecipients() {
return (count > 0)
}
/* addressbook helpers */
function initMailToSelection() {
currentIndex = lastIndex = $$("table#addressList tr").length - 2;
}
FastInit.addOnLoad(initMailToSelection);