Improvments to email editor

Monotone-Parent: f9cf3e34986ed3ca9506b2146ff9c4177d2eb7e6
Monotone-Revision: 8ba93fdae75ee545af159a1b88dfb6faccbe7bc2

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-08-06T21:22:11
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle 2009-08-06 21:22:11 +00:00
parent 93982c1989
commit d0f60f9e93
2 changed files with 20 additions and 17 deletions

View file

@ -151,10 +151,13 @@ UL#attachments LI
UL#attachments LI IMG UL#attachments LI IMG
{ vertical-align: bottom; } { vertical-align: bottom; }
#pageContent TEXTAREA #pageContent TEXTAREA,
#cke_text
{ position: absolute; { position: absolute;
left: 0em; left: 0;
right: 0em; right: 0;
bottom: 0em; bottom: 0;
top: 999em; /*top: 999em;*/ }
width: 99%; }
#pageContent TEXTAREA
{ width: 99%; }

View file

@ -676,11 +676,12 @@ function onWindowResize(event) {
var attachmentsarea = $("attachmentsArea"); var attachmentsarea = $("attachmentsArea");
var attachmentswidth = 0; var attachmentswidth = 0;
if (attachmentsarea.style.display) { if (attachmentsarea.style.display) {
// Resize attachments list
attachmentswidth = attachmentsarea.getWidth(); attachmentswidth = attachmentsarea.getWidth();
fromfield = $(document).getElementsByClassName('headerField', headerarea)[0]; fromfield = $(document).getElementsByClassName('headerField', headerarea)[0];
var height = headerarea.getHeight() - fromfield.getHeight() - 10; var height = headerarea.getHeight() - fromfield.getHeight() - 10;
if (Prototype.Browser.IE) if (Prototype.Browser.IE)
$("attachments").setStyle({ height: (height-9) + 'px' }); $("attachments").setStyle({ height: (height - 13) + 'px' });
else else
$("attachments").setStyle({ height: height + 'px' }); $("attachments").setStyle({ height: height + 'px' });
} }
@ -706,23 +707,22 @@ function onWindowResize(event) {
if (composeMode == "html") { if (composeMode == "html") {
var editor = $('cke_text'); var editor = $('cke_text');
if (editor == null) { if (editor == null) {
setTimeout ('onWindowResize ()', 100); onWindowResize.defer();
return; return;
} }
var ck_top = $("cke_top_text");
var ck_bottom = $("cke_bottom_text");
var content = $("cke_contents_text"); var content = $("cke_contents_text");
var height = Math.floor(window.height() - editor.offsetTop); var top = hr.offsetTop;
var height = Math.floor(window.height() - top - ck_top.getHeight() - ck_bottom.getHeight());
content.height = (height-60) + "px";
content.style.height = (height-60) + "px";
if (Prototype.Browser.IE) { if (Prototype.Browser.IE) {
editor.style.width = ''; editor.style.width = '';
editor.style.height = ''; editor.style.height = '';
height += 3;
}
else {
content.setStyle({ 'top': hr.offsetTop + 'px' });
} }
editor.setStyle({ top: (top + 2) + 'px' });
content.setStyle({ height: height + 'px' });
} }
else else
textarea.rows = Math.floor((window.height() - textarea.offsetTop) / rowheight); textarea.rows = Math.floor((window.height() - textarea.offsetTop) / rowheight);