Monotone-Parent: 642c3f094e45b7be777dcf2dd60e04f120f02df4

Monotone-Revision: 04980f497e9c317b4d93db9ab0dae2f1e8e464ba

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2007-08-14T22:09:20
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2007-08-14 22:09:20 +00:00
parent 0d4428e270
commit 8e42f79fd2
11 changed files with 86 additions and 65 deletions
+16 -4
View File
@@ -30,9 +30,8 @@ function addContact(tag, fullContactName, contactId, contactName, contactEmail)
var stop = false;
var counter = 0;
var currentRow = $('row_' + counter);
while (currentRow
&& !stop) {
var currentValue = currentRow.childNodesWithTag("span")[1].childNodesWithTag("input")[0].value;
while (currentRow && !stop) {
var currentValue = $(currentRow.childNodesWithTag("span")[1]).childNodesWithTag("input")[0].value;
if (currentValue == neededOptionValue) {
stop = true;
insertContact($("addr_" + counter), contactName, contactEmail);
@@ -231,9 +230,12 @@ function initMailEditor() {
var list = $("attachments");
$(list).attachMenu("attachmentsMenu");
var elements = list.childNodesWithTag("li");
for (var i = 0; i < elements.length; i++)
for (var i = 0; i < elements.length; i++) {
Event.observe(elements[i], "click",
onRowClick.bindAsEventListener(elements[i]));
}
onWindowResize(null);
Event.observe(window, "resize", onWindowResize);
}
function getMenus() {
@@ -264,4 +266,14 @@ function onSelectAllAttachments() {
nodes[i].select();
}
function onWindowResize(event) {
var textarea = document.pageform.text;
var windowheight = (typeof self.innerHeight == "number" ? self.innerHeight : document.body.clientHeight);
var textareaoffset = textarea.offsetTop;
var rowheight = (Element.getHeight(textarea) / textarea.rows);
textarea.rows = Math.round((windowheight - textareaoffset) / rowheight);
log ("onWindowResize new number of rows = " + textarea.rows);
}
addEvent(window, 'load', initMailEditor);