HTML composition, take 2

Monotone-Parent: dbd490c81ea6cac4c12b2e17661e2fef43219e68
Monotone-Revision: 0801dc9f1e4fdc49ea44fc0450fb025c2639ed26

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-06-25T19:18:02
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2009-06-25 19:18:02 +00:00
parent 6ea89d62cd
commit b943372f17
1386 changed files with 231527 additions and 82366 deletions
+28 -13
View File
@@ -561,10 +561,7 @@ function initMailEditor() {
var subjectField = $$("div#subjectRow input").first();
initTabIndex($("addressList"), subjectField, textarea);
onWindowResize.defer();
Event.observe(window, "resize", onWindowResize);
Event.observe(window, "beforeunload", onMailEditorClose);
//onWindowResize.defer();
var focusField = (mailIsReply ? textarea : $("addr_0"));
focusField.focus();
@@ -573,12 +570,23 @@ function initMailEditor() {
var composeMode = UserDefaults["ComposeMessagesType"];
if (composeMode == "html") {
var oFCKeditor = new FCKeditor ('text');
oFCKeditor.BasePath = "/SOGo.woa/WebServerResources/fckeditor/";
oFCKeditor.ToolbarSet = 'Basic';
oFCKeditor.ReplaceTextarea ();
CKEDITOR.replace('text',
{
skin: "v2",
toolbar :
[['Bold', 'Italic', '-', 'NumberedList',
'BulletedList', '-', 'Link', 'Unlink', 'Image',
'JustifyLeft','JustifyCenter','JustifyRight',
'JustifyBlock','Font','FontSize','-','TextColor',
'BGColor']
]
}
);
}
onWindowResize (null);
Event.observe(window, "resize", onWindowResize);
Event.observe(window, "beforeunload", onMailEditorClose);
onWindowResize.defer();
}
function initializePriorityMenu() {
@@ -731,10 +739,17 @@ function onWindowResize(event) {
// Resize the textarea (message content)
var composeMode = UserDefaults["ComposeMessagesType"];
if (composeMode == "html") {
var editor = $('text___Frame');
editor.height = Math.floor(window.height() - editor.offsetTop) + "px";
editor.style.height = Math.floor(window.height() - editor.offsetTop) + "px";
editor.setStyle({ 'top': hr.offsetTop + 'px' });
var editor = $('cke_text');
if (editor == null) {
setTimeout ('onWindowResize ()', 100);
return;
}
var content = $("cke_contents_text");
var height = Math.floor(window.height() - editor.offsetTop);
content.height = (height-60) + "px";
content.style.height = (height-60) + "px";
content.setStyle({ 'top': hr.offsetTop + 'px' });
}
textarea.rows = Math.floor((window.height() - textarea.offsetTop) / rowheight);
}