Monotone-Parent: f440f1d2a2686eb9dd6e54c78651ec0dd6197a8a
Monotone-Revision: de5df66679da8b8e87d75ec3e045d06880110b27 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-12-06T23:55:39 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
6a6dcbb312
commit
54739be5e0
|
@ -214,6 +214,7 @@ function onAttachmentChange(event) {
|
|||
this.removeClassName("currentAttachment");
|
||||
var list = $("attachments");
|
||||
createAttachment(this, list);
|
||||
clickedEditorAttach(null)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,6 +250,12 @@ function clickedEditorSave(sender) {
|
|||
}
|
||||
|
||||
function onTextFocus() {
|
||||
var input = currentAttachmentInput();
|
||||
if (input)
|
||||
input.parentNode.removeChild(input);
|
||||
}
|
||||
|
||||
function onTextFirstFocus() {
|
||||
var content = this.getValue();
|
||||
if (content.lastIndexOf("--") == 0) {
|
||||
this.insertBefore(document.createTextNode("\r\n"),
|
||||
|
@ -258,7 +265,7 @@ function onTextFocus() {
|
|||
var length = this.getValue().length - signatureLength - 1;
|
||||
this.setCaretTo(length);
|
||||
}
|
||||
Event.stopObserving(this, "focus", onTextFocus);
|
||||
Event.stopObserving(this, "focus", onTextFirstFocus);
|
||||
}
|
||||
|
||||
function initMailEditor() {
|
||||
|
@ -283,6 +290,7 @@ function initMailEditor() {
|
|||
if (sigLimit > -1)
|
||||
signatureLength = (textContent.length - sigLimit);
|
||||
textarea.scrollTop = textarea.scrollHeight;
|
||||
textarea.observe("focus", onTextFirstFocus);
|
||||
textarea.observe("focus", onTextFocus);
|
||||
|
||||
onWindowResize(null);
|
||||
|
|
Loading…
Reference in New Issue