HTML Composing, see changelog

Monotone-Parent: b895c283a3da52c67fd91339f704dc8cd49b743f
Monotone-Revision: 5f0e6bd5b6298ffdd908398135216841ba3b6909

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-06-23T17:53:18
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2009-06-23 17:53:18 +00:00
parent 445224aa8f
commit f9337f183f
13 changed files with 236 additions and 113 deletions
+32 -1
View File
@@ -33,8 +33,22 @@ function initPreferences() {
_setupEvents(true);
if (typeof (initAdditionalPreferences) != "undefined")
initAdditionalPreferences();
$("replyPlacementList").observe("change", onReplyPlacementListChange);
$("replyPlacementList").observe ("change", onReplyPlacementListChange);
onReplyPlacementListChange();
var oFCKeditor = new FCKeditor ('signature');
oFCKeditor.BasePath = "/SOGo.woa/WebServerResources/fckeditor/";
oFCKeditor.ToolbarSet = 'Basic';
oFCKeditor.ReplaceTextarea ();
$('signature___Frame').style.height = "150px";
$('signature___Frame').height = "150px";
if (UserDefaults["ComposeMessagesType"] != "html") {
$("signature").style.display = 'inline';
$('signature___Frame').style.display = 'none';
}
$("composeMessagesType").observe ("change", onComposeMessagesTypeChange);
}
function onReplyPlacementListChange() {
@@ -48,4 +62,21 @@ function onReplyPlacementListChange() {
}
}
function onComposeMessagesTypeChange () {
var textArea = $('signature');
var oEditor = FCKeditorAPI.GetInstance('signature');
var editor = $('signature___Frame');
if ($("composeMessagesType").value == 0) {
textArea.style.display = 'inline';
editor.style.display = 'none';
textArea.value = oEditor.GetData();
}
else {
textArea.style.display = 'none';
editor.style.display = '';
oEditor.SetHTML(textArea.value);
}
}
document.observe("dom:loaded", initPreferences);