mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 20:10:33 +00:00
Monotone-Parent: 8132f0990f7fce9318097fee307c6bd9b58b1be1
Monotone-Revision: 481fe3d5a9c50bc134e3db63b08e84fc0a7456fd Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-11-02T15:09:44 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -17,25 +17,55 @@ DIV#addressList
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
SPAN.headerField
|
||||
{ line-height: 1.8em;
|
||||
float: left;
|
||||
clear: left;
|
||||
text-align: right;
|
||||
min-width: 7em;
|
||||
padding-left: 0.5em; }
|
||||
DIV.addressList
|
||||
{ margin: 5px; }
|
||||
|
||||
SPAN.headerInput INPUT
|
||||
{ padding-left: 24px; /* offset text input */
|
||||
padding-right: 4px;
|
||||
background-image: url('/SOGo.woa/WebServerResources/abcard.gif');
|
||||
TABLE#addressList
|
||||
{ border: 1px solid #333;
|
||||
border-bottom: 1px solid #aaa;
|
||||
border-right: 1px solid #ccc;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
width: 100%; }
|
||||
|
||||
TABLE#addressList TD
|
||||
{ background-color: #fff;
|
||||
border: 0px;
|
||||
border-bottom: 1px solid #C4C8FF;
|
||||
margin: 0px;
|
||||
padding: 1px; }
|
||||
|
||||
TABLE#addressList TD.headerField
|
||||
{ border-right: 1px solid #C4C8FF;
|
||||
width: 110px; }
|
||||
|
||||
TABLE#addressList TD.headerField SELECT
|
||||
{ border: 1px solid #eee; }
|
||||
|
||||
TABLE#addressList TD.headerInput
|
||||
{ background-image: url('/SOGo.woa/WebServerResources/abcard.gif');
|
||||
background-repeat: no-repeat;
|
||||
background-position: 2px center; }
|
||||
background-position: 2px center;
|
||||
padding-left: 24px;
|
||||
padding-right: 4px; }
|
||||
|
||||
TABLE#addressList TD.headerInput INPUT
|
||||
{ border: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
width: 100%; }
|
||||
|
||||
SPAN.headerField
|
||||
{ line-height: 2.0em;
|
||||
padding-left: 0.5em; }
|
||||
|
||||
DIV#subjectRow INPUT
|
||||
{ background-image: none;
|
||||
padding-left: 4px; /* offset text input */
|
||||
padding-right: 4px; }
|
||||
width: 60%; }
|
||||
|
||||
DIV#subjectRow SPAN.headerField
|
||||
{ float: left; }
|
||||
|
||||
div#compose_internetmarker
|
||||
{ padding: 8px;
|
||||
@@ -46,15 +76,16 @@ div#compose_internetmarker
|
||||
border-style: solid; }
|
||||
|
||||
div#headerArea
|
||||
{ border-top: 1px solid #fff; }
|
||||
{ border-top: 1px solid #fff;
|
||||
padding: 5px 0px; }
|
||||
|
||||
div#attachmentsArea
|
||||
{ display: none;
|
||||
float: right;
|
||||
width: 12em;
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
padding-right: 1em;
|
||||
margin: auto;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
border-left: 1px solid #888; }
|
||||
|
||||
|
||||
@@ -254,6 +254,9 @@ function initMailEditor() {
|
||||
if (listContent.length > 0)
|
||||
$("attachmentsArea").setStyle({ display: "block" });
|
||||
|
||||
var list = $("addressList");
|
||||
TableKit.Resizable.init(list, {'trueResize' : true, 'keepWidth' : true});
|
||||
|
||||
onWindowResize(null);
|
||||
Event.observe(window, "resize", onWindowResize);
|
||||
Event.observe(window, "beforeunload", onMailEditorClose);
|
||||
@@ -314,6 +317,30 @@ function onWindowResize(event) {
|
||||
var textarea = document.pageform.text;
|
||||
var rowheight = (Element.getHeight(textarea) / textarea.rows);
|
||||
var headerarea = $("headerArea");
|
||||
|
||||
var attachmentsarea = $("attachmentsArea");
|
||||
var attachmentswidth = 0;
|
||||
if (attachmentsarea.style.display) {
|
||||
attachmentswidth = attachmentsarea.getWidth();
|
||||
// Resize of attachment list is b0rken under IE7
|
||||
// fromfield = $(document).getElementsByClassName('headerField',
|
||||
// headerarea)[0];
|
||||
// $("attachments").setStyle({ height: (headerarea.getHeight() - fromfield.getHeight() - 10) + 'px' });
|
||||
}
|
||||
// var subjectfield = $(document).getElementsByClassName('headerField',
|
||||
// $('subjectRow'))[0];
|
||||
// var subjectinput = $(document).getElementsByClassName('textField',
|
||||
// $('subjectRow'))[0];
|
||||
//
|
||||
// Resize subject field
|
||||
// subjectinput.setStyle({ width: (window.width()
|
||||
// - $(subjectfield).getWidth()
|
||||
// - attachmentswidth
|
||||
// - 4 - 30) + 'px' });
|
||||
|
||||
// Resize address fields
|
||||
var addresslist = $('addressList');
|
||||
addresslist.setStyle({ width: ($(this).width() - attachmentswidth - 10) + 'px' });
|
||||
|
||||
// Set textarea position
|
||||
textarea.setStyle({ 'top': (headerarea.getHeight() + headerarea.offsetTop) + 'px' });
|
||||
@@ -322,30 +349,6 @@ function onWindowResize(event) {
|
||||
|
||||
// Resize the textarea (message content)
|
||||
textarea.rows = Math.round((window.height() - textareaoffset) / rowheight);
|
||||
|
||||
var attachmentsarea = $("attachmentsArea");
|
||||
var attachmentswidth = 0;
|
||||
if (attachmentsarea.style.display)
|
||||
attachmentswidth = attachmentsarea.getWidth();
|
||||
var subjectfield = $(document).getElementsByClassName('headerField',
|
||||
$('subjectRow'))[0];
|
||||
var subjectinput = $(document).getElementsByClassName('textField',
|
||||
$('subjectRow'))[0];
|
||||
|
||||
// Resize subject field
|
||||
subjectinput.setStyle({ width: (window.width()
|
||||
- $(subjectfield).getWidth()
|
||||
- attachmentswidth
|
||||
- 4 - 30) + 'px' });
|
||||
|
||||
// Resize address fields
|
||||
var addresslist = $('addressList');
|
||||
var firstselect = document.getElementsByClassName('headerField', addresslist)[0];
|
||||
var inputwidth = ($(this).width() - $(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) {
|
||||
|
||||
@@ -94,7 +94,7 @@ function fancyAddRow(shouldEdit, text) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
addressList = $("addressList");
|
||||
addressList = $("addressList").tBodies[0];
|
||||
lastChild = $("lastRow");
|
||||
|
||||
currentIndex++;
|
||||
@@ -104,7 +104,7 @@ function fancyAddRow(shouldEdit, text) {
|
||||
row.id = 'row_' + currentIndex;
|
||||
|
||||
// select popup
|
||||
var rowNodes = row.childNodesWithTag("span");
|
||||
var rowNodes = row.childNodesWithTag("td");
|
||||
select = $(rowNodes[0]).childNodesWithTag("select")[0];
|
||||
select.name = 'popup_' + currentIndex;
|
||||
// select.value = row.childNodesWithTag("span")[0].childNodesWithTag("select")[0].value;
|
||||
@@ -153,7 +153,7 @@ function removeLastEditedRowIfEmpty() {
|
||||
var addresses = $('addr_addresses');
|
||||
addresses.removeChild(addr);
|
||||
}
|
||||
addressList = $("addressList");
|
||||
addressList = $("addressList").tBodies[0];
|
||||
senderRow = $("row_" + idx);
|
||||
addressList.removeChild(senderRow);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user