diff --git a/UI/Templates/MailerUI/UIxMailEditor.wox b/UI/Templates/MailerUI/UIxMailEditor.wox
index bacdcb53a..bfc1976a6 100644
--- a/UI/Templates/MailerUI/UIxMailEditor.wox
+++ b/UI/Templates/MailerUI/UIxMailEditor.wox
@@ -51,8 +51,8 @@
class="textField"
var:value="subject"
/>
+
-
diff --git a/UI/WebServerResources/UIxMailEditor.css b/UI/WebServerResources/UIxMailEditor.css
index d9cc74eba..94b5f0a8f 100644
--- a/UI/WebServerResources/UIxMailEditor.css
+++ b/UI/WebServerResources/UIxMailEditor.css
@@ -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%; }
diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js
index 6f8018e4f..d84345b71 100644
--- a/UI/WebServerResources/UIxMailEditor.js
+++ b/UI/WebServerResources/UIxMailEditor.js
@@ -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) {
diff --git a/UI/WebServerResources/UIxMailToSelection.js b/UI/WebServerResources/UIxMailToSelection.js
index 663573ec6..a0cc0f3a5 100644
--- a/UI/WebServerResources/UIxMailToSelection.js
+++ b/UI/WebServerResources/UIxMailToSelection.js
@@ -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 */
diff --git a/UI/WebServerResources/generic.css b/UI/WebServerResources/generic.css
index 65ea6e83a..07f979f67 100644
--- a/UI/WebServerResources/generic.css
+++ b/UI/WebServerResources/generic.css
@@ -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;
diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js
index 1dc5f4222..c16071500 100644
--- a/UI/WebServerResources/generic.js
+++ b/UI/WebServerResources/generic.js
@@ -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("<", "<", "g");
logMessage = logMessage.replace(" ", " ", "g");
logMessage = logMessage.replace("\r\n", "
\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();