mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-12 23:15:26 +00:00
Added signature/reply placement options
Monotone-Parent: c465e35fc5f42324c08780dae83f7d225dca6e6a Monotone-Revision: 1d1c945ea058db7070c9b83c4c2bb60689c52f92 Monotone-Author: crobert@inverse.ca Monotone-Date: 2008-09-28T19:49:17 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -313,14 +313,22 @@ function onTextIEUpdateCursorPos(event) {
|
||||
|
||||
function onTextFirstFocus() {
|
||||
var content = this.getValue();
|
||||
if (content.lastIndexOf("--") == 0) {
|
||||
this.insertBefore(document.createTextNode("\r"),
|
||||
this.lastChild);
|
||||
}
|
||||
if (signatureLength > 0) {
|
||||
var length = this.getValue().length - signatureLength - 2;
|
||||
this.setCaretTo(length);
|
||||
}
|
||||
var signaturePlacement = userDefaults["SignaturePlacement"];
|
||||
if ( typeof(signaturePlacement) == "undefined" ) {
|
||||
signaturePlacement = "below";
|
||||
}
|
||||
var replyPlacement = userDefaults["ReplyPlacement"];
|
||||
if ( typeof(replyPlacement) == "undefined" ) {
|
||||
replyPlacement = signaturePlacement;
|
||||
}
|
||||
|
||||
if ( replyPlacement == "above" ) {
|
||||
this.setCaretTo(0);
|
||||
}
|
||||
else {
|
||||
this.setCaretTo(this.getValue().length - signatureLength - 2);
|
||||
}
|
||||
|
||||
Event.stopObserving(this, "focus", onTextFirstFocus);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user