Monotone-Parent: b3fc892e5da4aadb8256c6689800fd5069d6ac91

Monotone-Revision: 036947e22f5b3eb801463875f6254522044e8867

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2007-09-10T18:46:05
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2007-09-10 18:46:05 +00:00
parent b7a1fd2c40
commit a953c7c4b3
6 changed files with 80 additions and 59 deletions
+1 -1
View File
@@ -51,8 +51,8 @@
class="textField"
var:value="subject"
/></span></div>
<!-- separator line --><hr/>
</div>
<!-- separator line -->
<textarea name="text" rows="30" var:value="text" />
<!-- img rsrc:src="tbird_073_compose.png" alt="screenshot" / -->
</form>
+30 -29
View File
@@ -1,49 +1,41 @@
/* CSS for compose panel */
div#compose_panel div table {
padding: 2px;
}
div#compose_panel div table
{ padding: 2px; }
TABLE#compose_table, TABLE#compose_table DIV
{
width: 100%;
}
{ width: 100%; }
TABLE#compose_label
{
text-align: right;
}
{ text-align: right; }
DIV#addressList
{ height: 8em;
margin-bottom: .25em;
{ clear: left;
height: 8em;
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
}
DIV.addressListElement
{ margin: 0px;
padding: 0px; }
SPAN.headerField
{ line-height: 1.8em;
width: 7em;
text-align: right; }
float: left;
clear: left;
text-align: right;
min-width: 7em;
padding-left: 0.5em; }
SPAN.headerInput INPUT
{ width: 50%;
padding-left: 24px;
{ padding-left: 24px; /* offset text input */
padding-right: 4px;
background-image: url('/SOGo.woa/WebServerResources/abcard.gif');
background-repeat: no-repeat;
background-position: 2px center; }
DIV#subjectRow
{ margin-left: 9em; }
DIV#subjectRow INPUT
{ background-image: none;
width: 50%;
padding-left: .5em; }
padding-left: 4px; /* offset text input */
padding-right: 4px; }
div#compose_internetmarker
{ padding: 8px;
@@ -54,8 +46,7 @@ div#compose_internetmarker
border-style: solid; }
div#headerArea
{ border-top: 1px solid #fff;
border-bottom: 1px solid #848284; }
{ border-top: 1px solid #fff; }
div#attachmentsArea
{ display: none;
@@ -67,6 +58,17 @@ div#attachmentsArea
padding-left: 5px;
border-left: 1px solid #888; }
hr
{ background-color: #848284;
border: 0;
clear: both;
color: #848284;
float: left;
height: 1px;
margin: 0px;
padding: 0px;
width: 100%; }
input.currentAttachment
{ position: absolute;
top: 1em;
@@ -90,8 +92,7 @@ UL#attachments
{ cursor: default;
margin: 0px;
padding: 0px;
width: 100%;
height: 10em;
height: 9em;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
border-top: 2px solid #222;
@@ -116,5 +117,5 @@ DIV.pageContent TEXTAREA
left: 0em;
right: 0em;
bottom: 0em;
top: 17em;
top: 13em;
width: 100%; }
+37 -4
View File
@@ -153,8 +153,12 @@ function clickedEditorSend(sender) {
function clickedEditorAttach(sender) {
var area = $("attachmentsArea");
area.setStyle({ display: "block" });
if (!area.style.display) {
area.setStyle({ display: "block" });
onWindowResize(null);
}
var inputs = area.getElementsByTagName("input");
var attachmentName = "attachment" + inputs.length;
var newAttachment = createElement("input", attachmentName,
@@ -289,11 +293,40 @@ function onSelectAllAttachments() {
function onWindowResize(event) {
var textarea = document.pageform.text;
var windowheight = (typeof self.innerHeight == "number" ? self.innerHeight : document.body.clientHeight);
var textareaoffset = textarea.offsetTop;
var rowheight = (Element.getHeight(textarea) / textarea.rows);
var headerarea = $("headerArea");
// Set textarea position
textarea.setStyle({ 'top': (headerarea.getHeight() + headerarea.offsetTop) + 'px' });
var textareaoffset = textarea.offsetTop;
// Resize the textarea (message content)
textarea.rows = Math.round((windowheight - textareaoffset) / rowheight);
log ("onWindowResize new number of rows = " + textarea.rows);
var attachmentsarea = $("attachmentsArea");
var attachmentswidth = 0;
if (attachmentsarea.style.display)
attachmentswidth = attachmentsarea.getWidth();
var windowwidth = (typeof self.innerWidth == "number" ? self.innerWidth : document.body.clientWidth);
var subjectfield = $(document).getElementsByClassName('headerField', $('subjectRow'))[0];
var subjectinput = $(document).getElementsByClassName('textField', $('subjectRow'))[0];
// Resize subject field
subjectinput.setStyle({ width: (windowwidth
- $(subjectfield).getWidth()
- attachmentswidth
- 4 - 30
) + 'px' });
// Resize address fields
var addresslist = $('addressList');
var firstselect = document.getElementsByClassName('headerField', addresslist)[0];
var inputwidth = windowwidth - $(firstselect).getWidth() - attachmentswidth - 24 - 30;
var addresses = document.getElementsByClassName('textField', addresslist);
for (var i = 0; i < addresses.length; i++) {
addresses[i].setStyle({ width: inputwidth + 'px' });
}
}
function onMailEditorClose(event) {
+2 -19
View File
@@ -121,15 +121,15 @@ function fancyAddRow(shouldEdit, text) {
input.select();
input.setAttribute('autocomplete', 'on');
}
// this.adjustInlineAttachmentListHeight(this);
}
function addressFieldGotFocus(sender) {
var idx;
idx = this.getIndexFromIdentifier(sender.id);
if ((lastIndex == idx) || (idx == 0)) return;
if (lastIndex == idx) return;
this.removeLastEditedRowIfEmpty();
onWindowResize(null);
return false;
}
@@ -156,7 +156,6 @@ function removeLastEditedRowIfEmpty() {
addressList = $("addressList");
senderRow = $("row_" + idx);
addressList.removeChild(senderRow);
this.adjustInlineAttachmentListHeight(this);
}
function findAddressWithIndex(idx) {
@@ -225,21 +224,5 @@ function UIxRecipientSelectorHasRecipients() {
return false;
}
function adjustInlineAttachmentListHeight(sender) {
var e;
e = $('attachmentsArea');
if (e.style.display != 'none') {
/* need to lower left size first, because left auto-adjusts to right! */
xHeight('compose_attachments_list', 10);
var leftHeight, rightHeaderHeight;
leftHeight = xHeight('compose_leftside');
rightHeaderHeight = xHeight('compose_attachments_header');
xHeight('compose_attachments_list',
(leftHeight - rightHeaderHeight) - 16);
}
}
/* addressbook helpers */
+3 -3
View File
@@ -200,6 +200,7 @@ TEXTAREA
DIV, TEXTAREA, INPUT, SELECT
{ font-family: inherit;
font-size: 8pt;
font-size: inherit; }
TEXTAREA, INPUT.textField
@@ -213,8 +214,7 @@ TEXTAREA, INPUT.textField
-moz-border-left-colors: #9c9a94 #000 transparent; }
INPUT.textField
{ line-height: 2em;
vertical-align: middle; }
{ vertical-align: middle; }
DIV#toolbar
{ left: 0px;
@@ -366,7 +366,7 @@ DIV#logConsole
-moz-border-top-colors: #000 #9c9a94 transparent;
-moz-border-left-colors: #000 #9c9a94 transparent;
font-family: monospace;
font-size: 12pt;
font-size: 9pt;
padding: .25em;
background-color: #fff;
overflow-y: scroll;
+7 -3
View File
@@ -364,8 +364,8 @@ function getTarget(event) {
function preventDefault(event) {
if (event.preventDefault)
event.preventDefault(); // W3C DOM
event.returnValue = false; // IE
else
event.returnValue = false; // IE
}
function resetSelection(win) {
@@ -692,6 +692,10 @@ function log(message) {
var logConsole = logWindow.document.getElementById("logConsole");
if (logConsole) {
logConsole.highlighted = !logConsole.highlighted;
if (message == '\c') {
logConsole.innerHTML = "";
return;
}
var logMessage = message.replace("<", "&lt;", "g");
logMessage = logMessage.replace(" ", "&nbsp;", "g");
logMessage = logMessage.replace("\r\n", "<br />\n", "g");
@@ -1301,7 +1305,7 @@ function onLinkBannerClick() {
function onPreferencesClick(event) {
var urlstr = UserFolderURL + "preferences";
var w = window.open(urlstr, "User Preferences",
var w = window.open(urlstr, "_blank",
"width=430,height=250,resizable=0,scrollbars=0");
w.opener = window;
w.focus();