return [[[self message] valueForKey:@"uid"] stringValue];
}
-- (NSString *) messageCellStyleClass
+- (NSString *) messageRowStyleClass
{
return [self isMessageDeleted]
? @"mailer_listcell_deleted"
- (NSString *) messageSubjectCellStyleClass
{
- return [NSString stringWithFormat: @"%@ %@",
- [self messageCellStyleClass],
- ([self isMessageRead]
- ? @"mailer_readmailsubject"
- : @"mailer_unreadmailsubject")];
+ return ([self isMessageRead]
+ ? @"mailer_readmailsubject"
+ : @"mailer_unreadmailsubject");
}
- (BOOL) hasMessageAttachment
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:rsrc="OGo:url"
xmlns:label="OGo:label">
- <tbody>
+ <thead>
<tr class="tableview"
><td class="tbtv_headercell messageFlagColumn"
><var:entity const:name="nbsp" /></td
const:isDefault="YES"
/></td
></tr>
- <var:if condition="showsAllMessages" const:negate="YES"
- ><tr class="tableview"
- ><td colspan="6" class="tbtv_navcell"
- ><var:if condition="hasPrevious">
- <a href="#"
- idx="1"><var:string label:value="first"/></a> |
- <a href="#"
- var:idx="prevFirstMessageNumber"
- ><var:string label:value="previous"/></a> |
- </var:if>
- <var:string value="firstMessageNumber" />
- <var:string label:value="msgnumber_to" />
- <var:string value="lastMessageNumber" />
- <var:string label:value="msgnumber_of" />
- <var:string value="sortedUIDs.count" />
+ <tr class="tableview"
+ ><td colspan="6" class="tbtv_navcell"
+ ><var:if condition="hasPrevious">
+ <a href="#"
+ idx="1"><var:string label:value="first"/></a> |
+ <a href="#"
+ var:idx="prevFirstMessageNumber"
+ ><var:string label:value="previous"/></a> |
+ </var:if>
+ <var:string value="firstMessageNumber" />
+ <var:string label:value="msgnumber_to" />
+ <var:string value="lastMessageNumber" />
+ <var:string label:value="msgnumber_of" />
+ <var:string value="sortedUIDs.count" />
<var:if condition="hasNext"
- >| <a href="#"
- var:idx="nextFirstMessageNumber"
- ><var:string label:value="next" /></a>
- </var:if
- ></td
- ></tr
- ></var:if>
+ >| <a href="#"
+ var:idx="nextFirstMessageNumber"
+ ><var:string label:value="next" /></a>
+ </var:if
+ ></td
+ ></tr
+ >
+ </thead>
+ <tbody>
<var:foreach list="messages" item="message"
- ><tr class="tableview" var:id="msgRowID"
- ><td></td
- ><td><var:if condition="hasMessageAttachment"
+ ><tr var:class="messageRowStyleClass" var:id="msgRowID"
+ ><td class="messageFlagColumn"><var:entity name="nbsp"/></td
+ ><td class="messageFlagColumn"
+ ><var:if condition="hasMessageAttachment"
><img rsrc:src="title_attachment_14x14.png"
/></var:if
></td
formatter="context.mailSubjectFormatter"
/></td
- ><td
- var:class="messageCellStyleClass"
+ ><td class="messageAddressColumn"
><var:if condition="showToAddress" const:negate="YES"
><var:string value="message.envelope.from"
formatter="context.mailEnvelopeAddressFormatter"
/></var:if
></td
- ><td var:class="messageCellStyleClass"
+ ><td class="messageFlagColumn"
><var:if condition="isMessageRead"
><img rsrc:src="icon_read.gif"
class="mailerReadIcon"
/></var:if
></td
- ><td var:class="messageCellStyleClass"
+ ><td class="messageDateColumn"
><span class="mailer_datefield"
><var:string value="message.envelope.date"
formatter="context.mailDateFormatter"
{ background-color: #fff;
position: absolute;
width: 100%;
- height: 18em;
+ height: 15.5em;
left: 0px;
top: 2.5em;
right: 0px; }
text-decoration: none;
}
-td.mailer_listcell_deleted
+tr.mailer_listcell_deleted td
{
text-decoration: line-through;
}
-td.mailer_listcell_regular a
+tr.mailer_listcell_regular td a
{
color: black;
text-decoration: none;
width: 100%;
left: 0px;
right: 0px;
- top: 0px;
- bottom: 0px;
+ top: 3.25em;
+ bottom: 1px;
overflow: auto;
- overflow-x: hidden;
-}
+ overflow-x: hidden; }
-TABLE#messageList TBODY
-{
+TABLE#messageList THEAD
+{ position: fixed;
+ margin-top: 1px;
+ top: 7.5em;
right: 0px;
- left: 0px;
- bottom: 3em;
- width: 100%;
- background: #fff;
- color: #000;
-}
+ left: 15.5em;
+ height: 2em; }
TABLE#messageList TD
-{
- height: 1.2em;
-}
+{ height: 1.2em; }
-TABLE#messageList TD.tbtv_subject_headercell
+TABLE#messageList TD.messageFlagColumn
+{ width: 1em;
+ text-align: center; }
+
+TABLE#messageList TD.tbtv_subject_headercell,
+TABLE#messageList td.mailer_unreadmailsubject,
+TABLE#messageList td.mailer_readmailsubject
{ width: 40%; }
-TABLE#messageList TD.tbtv_from_headercell
+TABLE#messageList TD.tbtv_from_headercell,
+TABLE#messageList TD.messageAddressColumn
{ width: 35%; }
-TABLE#messageList TD.tbtv_date_headercell
+TABLE#messageList TD.tbtv_date_headercell,
+TABLE#messageList TD.messageDateColumn
{ width: 25%; }
TABLE#messageList TR._selected TD
right: 0px;
height: 5px;
}
-
-TD.messageFlagColumn
-{
- width: 1em !important;
-}
function configureMessageListEvents() {
var messageList = $("messageList");
if (messageList) {
- Event.observe(messageList, "mousedown", onMessageSelectionChange.bindAsEventListener(messageList));
- var rows = messageList.tBodies[0].rows;
- var start = 0;
- if (rows.length > 1) {
- if ($(rows[start].cells[0]).hasClassName("tbtv_headercell"))
- start++;
- if ($(rows[start].cells[0]).hasClassName("tbtv_navcell")) {
- var anchors = $(rows[start].cells[0]).childNodesWithTag("a");
- for (var i = 0; i < anchors.length; i++)
- Event.observe(anchors[i], "click", openMailboxAtIndex.bindAsEventListener(anchors[i]));
- start++;
- }
- for (var i = start; i < rows.length; i++) {
- Event.observe(rows[i], "mousedown", onRowClick);
- Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i]));
-
- rows[i].dndTypes = function() { return new Array("mailRow"); };
- rows[i].dndGhost = messageListGhost;
- rows[i].dndDataForType = messageListData;
- document.DNDManager.registerSource(rows[i]);
-
- for (var j = 0; j < rows[i].cells.length; j++) {
- var cell = rows[i].cells[j];
- Event.observe(cell, "mousedown", listRowMouseDownHandler);
- if (j == 2 || j == 3 || j == 5)
- Event.observe(cell, "dblclick", onMessageDoubleClick.bindAsEventListener(cell));
- else if (j == 4) {
- var img = cell.childNodesWithTag("img")[0];
- Event.observe(img, "click", mailListMarkMessage);
- }
+ Event.observe(messageList, "mousedown",
+ onMessageSelectionChange.bindAsEventListener(messageList));
+ var cell = messageList.tHead.rows[1].cells[0];
+ 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]));
+ }
+
+ rows = messageList.tBodies[0].rows;
+ for (var i = 0; i < rows.length; i++) {
+ Event.observe(rows[i], "mousedown", onRowClick);
+ Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i]));
+
+ rows[i].dndTypes = function() { return new Array("mailRow"); };
+ rows[i].dndGhost = messageListGhost;
+ rows[i].dndDataForType = messageListData;
+ document.DNDManager.registerSource(rows[i]);
+
+ for (var j = 0; j < rows[i].cells.length; j++) {
+ var cell = rows[i].cells[j];
+ Event.observe(cell, "mousedown", listRowMouseDownHandler);
+ if (j == 2 || j == 3 || j == 5)
+ Event.observe(cell, "dblclick", onMessageDoubleClick.bindAsEventListener(cell));
+ else if (j == 4) {
+ var img = cell.childNodesWithTag("img")[0];
+ Event.observe(img, "click", mailListMarkMessage);
}
}
}