Monotone-Parent: 994b69bf5b441d8ad6fa804a31ee33b25a0ec13e
Monotone-Revision: ffa02d814d2b95752685c44776cbbb2b26be4b47 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-09T18:44:25 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
1bdc70bbda
commit
7bc8c818e9
|
@ -55,9 +55,11 @@ function addContact(tag, fullContactName, contactId, contactName, contactEmail)
|
|||
|
||||
if (!stop) {
|
||||
fancyAddRow(false, "");
|
||||
$($("row_" + counter).childNodesWithTag("td")[0]).childNodesWithTag("select")[0].value
|
||||
= neededOptionValue;
|
||||
insertContact($("addr_" + counter), contactName, contactEmail);
|
||||
var row = $("row_" + currentIndex);
|
||||
var td = $(row.childNodesWithTag("td")[0]);
|
||||
var select = $(td.childNodesWithTag("select")[0]);
|
||||
select.value = neededOptionValue;
|
||||
insertContact($("addr_" + currentIndex), contactName, contactEmail);
|
||||
onWindowResize(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,31 +51,29 @@ function checkAddresses() {
|
|||
}
|
||||
|
||||
function fancyAddRow(shouldEdit, text, type) {
|
||||
var addr, addressList, lastChild, proto, row, select, input;
|
||||
|
||||
addr = $('addr_' + lastIndex);
|
||||
var addr = $('addr_' + lastIndex);
|
||||
if (addr && addr.value == '') {
|
||||
input = $('subjectField');
|
||||
var input = $('subjectField');
|
||||
if (input && input.value != '') {
|
||||
input.focus();
|
||||
input.select();
|
||||
return;
|
||||
}
|
||||
}
|
||||
addressList = $("addressList").tBodies[0];
|
||||
lastChild = $("lastRow");
|
||||
var addressList = $("addressList").tBodies[0];
|
||||
var lastChild = $("lastRow");
|
||||
|
||||
currentIndex++;
|
||||
proto = lastChild.previous("tr");
|
||||
row = proto.cloneNode(true);
|
||||
var proto = lastChild.previous("tr");
|
||||
var row = proto.cloneNode(true);
|
||||
row.writeAttribute("id", 'row_' + currentIndex);
|
||||
|
||||
// select popup
|
||||
var rowNodes = row.childNodesWithTag("td");
|
||||
select = $(rowNodes[0]).childNodesWithTag("select")[0];
|
||||
var select = $(rowNodes[0]).childNodesWithTag("select")[0];
|
||||
select.name = 'popup_' + currentIndex;
|
||||
select.value = (type? type : proto.down("select").value);
|
||||
input = $(rowNodes[1]).childNodesWithTag("input")[0];
|
||||
var input = $(rowNodes[1]).childNodesWithTag("input")[0];
|
||||
input.name = 'addr_' + currentIndex;
|
||||
input.id = 'addr_' + currentIndex;
|
||||
input.value = text;
|
||||
|
|
Loading…
Reference in New Issue