merge of '8b5761d2acde444a5c7b9214e3506a044c23919b'

and 'be71096e4701678c38f432b7c7ceb5d87bfd349f'

Monotone-Parent: 8b5761d2acde444a5c7b9214e3506a044c23919b
Monotone-Parent: be71096e4701678c38f432b7c7ceb5d87bfd349f
Monotone-Revision: 80314eb2f15e5d1fc369f56a8001f005ba7e0f5f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-11-20T17:01:19
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-11-20 17:01:19 +00:00
5 changed files with 37 additions and 5 deletions
+19
View File
@@ -1,4 +1,5 @@
var contactSelectorAction = 'mailer-contacts';
var signatureLength = 0;
function onContactAdd() {
var selector = null;
@@ -240,6 +241,16 @@ function clickedEditorSave(sender) {
return false;
}
function onTextFocus() {
this.insertBefore(document.createTextNode("\r\n"),
this.lastChild);
if (signatureLength > 0) {
var length = this.getValue().length - signatureLength - 1;
this.setSelectionRange(length, length);
}
Event.stopObserving(this, "focus", onTextFocus);
}
function initMailEditor() {
var list = $("attachments");
$(list).attachMenu("attachmentsMenu");
@@ -256,6 +267,14 @@ function initMailEditor() {
var list = $("addressList");
TableKit.Resizable.init(list, {'trueResize' : true, 'keepWidth' : true});
var textarea = $("text");
var textContent = textarea.getValue();
var sigLimit = textContent.lastIndexOf("--");
if (sigLimit > -1)
signatureLength = (textContent.length - sigLimit);
Event.observe(textarea, "focus",
onTextFocus.bindAsEventListener(textarea));
onWindowResize(null);
Event.observe(window, "resize", onWindowResize);
Event.observe(window, "beforeunload", onMailEditorClose);
+7 -3
View File
@@ -196,8 +196,7 @@ DIV, TEXTAREA, INPUT, SELECT
font-size: inherit; }
TEXTAREA, INPUT.textField
{ padding: 0px;
margin: .15em;
{ margin: 1px;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
border-top: 2px solid #222;
@@ -205,8 +204,13 @@ TEXTAREA, INPUT.textField
-moz-border-top-colors: #9c9a94 #000 transparent;
-moz-border-left-colors: #9c9a94 #000 transparent; }
TEXTAREA
{ padding: 0px;
padding-left: 2px; }
INPUT.textField
{ vertical-align: middle; }
{ padding: 2px;
vertical-align: middle; }
DIV#toolbar
{ left: 0px;