Monotone-Parent: 7133fd7356e5b22d44eb78eba6f71c5c5fa95889

Monotone-Revision: 33cd28ec24da9b667bfbfe813859158a7c753836

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-03-26T18:58:26
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-03-26 18:58:26 +00:00
parent 79f2b71fdb
commit 4b815c9bd7
4 changed files with 55 additions and 16 deletions
+6 -6
View File
@@ -40,29 +40,29 @@
</tr>
<tr class="mailer_fieldrow">
<td class="mailer_fieldname"><var:string label:value="To"/>:</td>
<td class="mailer_fieldname"><img rsrc:src="plus.png" class="collapse" style="display: none;" /><var:string label:value="To"/>:</td>
<td class="mailer_fieldvalue">
<var:foreach list="clientObject.toEnvelopeAddresses"
<span class="collapse"><var:foreach list="clientObject.toEnvelopeAddresses"
item="currentAddress"
><a var:href="currentAddressLink">
<var:string value="currentAddress"
formatter="context.mailEnvelopeFullAddressFormatter"
/></a>
</var:foreach>
</var:foreach></span>
</td>
</tr>
<var:if condition="hasCC">
<tr class="mailer_fieldrow">
<td class="mailer_fieldname"><var:string label:value="CC"/>:</td>
<td class="mailer_fieldname"><img rsrc:src="plus.png" class="collapse" style="display: none;" /><var:string label:value="CC"/>:</td>
<td class="mailer_fieldvalue">
<var:foreach list="clientObject.ccEnvelopeAddresses"
<span class="collapse"><var:foreach list="clientObject.ccEnvelopeAddresses"
item="currentAddress">
<a var:href="currentAddressLink"
><var:string value="currentAddress"
formatter="context.mailEnvelopeFullAddressFormatter"
/></a>
<!-- TODO: better to use li+CSS -->
</var:foreach>
</var:foreach></span>
</td>
</tr>
</var:if>
+10 -3
View File
@@ -384,6 +384,15 @@ DIV.mailer_mailcontent TABLE
table-layout: auto;
}
/* collapsable header */
TD.mailer_fieldname IMG
{ cursor: pointer;
padding-right: 5px; }
TD.mailer_fieldvalue SPAN.collapse
{ white-space: nowrap; }
TD.mailer_fieldvalue SPAN.expand
{ white-space: normal; }
TD.mailer_fieldname
{
white-space: nowrap;
@@ -395,9 +404,7 @@ TD.mailer_fieldname
}
TD.mailer_fieldvalue
{
vertical-align: top;
}
{ vertical-align: top; }
TD.mailer_subjectfieldvalue
{
+36 -4
View File
@@ -850,6 +850,38 @@ function resizeMailContent() {
contentDiv.setStyle({ 'top':
(Element.getHeight(headerTable) + headerTable.offsetTop) + 'px' });
// Show expand buttons if necessary
var spans = $$("TABLE TR.mailer_fieldrow TD.mailer_fieldvalue SPAN");
spans.each(function(span) {
var row = span.up("TR");
if (span.getWidth() > row.getWidth()) {
var cell = row.select("TD.mailer_fieldname").first();
var link = cell.down("img");
link.show();
link.observe("click", toggleDisplayHeader);
}
});
}
function toggleDisplayHeader(event) {
var row = this.up("TR");
var span = row.down("SPAN");
if (this.hasClassName("collapse")) {
this.writeAttribute("src", ResourcesURL + '/minus.png');
this.writeAttribute("class", "expand");
span.writeAttribute("class", "expand");
}
else {
this.writeAttribute("src", ResourcesURL + '/plus.png');
this.writeAttribute("class", "collapse");
span.writeAttribute("class", "collapse");
}
resizeMailContent();
preventDefault(event);
return false;
}
function onMessageContentMenu(event) {
@@ -1030,8 +1062,8 @@ function expandUpperTree(node) {
var id = currentNode.getAttribute("id");
var number = parseInt(id.substr(2));
if (number > 0) {
var cn = mailboxTree.aNodes[number];
mailboxTree.nodeStatus(1, number, cn._ls);
var cn = mailboxTree.aNodes[number];
mailboxTree.nodeStatus(1, number, cn._ls);
}
}
currentNode = currentNode.parentNode;
@@ -1168,8 +1200,8 @@ function configureMessageListBodyEvents(table) {
if ($(cell).hasClassName("tbtv_navcell")) {
var anchors = $(cell).childNodesWithTag("a");
for (var i = 0; i < anchors.length; i++)
Event.observe(anchors[i], "click",
openMailboxAtIndex.bindAsEventListener(anchors[i]));
Event.observe(anchors[i], "click",
openMailboxAtIndex.bindAsEventListener(anchors[i]));
}
rows = table.tBodies[0].rows;
+3 -3
View File
@@ -505,9 +505,9 @@ function onRowClick(event) {
var list = node.parentNode;
var items = list.childNodesWithTag("li");
for (var i = 0; i < items.length; i++) {
if (items[i] == node) {
rowIndex = i;
break;
if (items[i] == node) {
rowIndex = i;
break;
}
}
}