Monotone-Parent: 16389bba889c23c9a03ac425c27e5f4ede0fc4fd

Monotone-Revision: a0736ebfe97dd1ff5f02d3f1a6f20c4e5c593b0c

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-09-05T01:39:32
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2008-09-05 01:39:32 +00:00
parent cd45df0b75
commit ed9ebe829d
3 changed files with 17 additions and 12 deletions

View File

@ -1,6 +1,6 @@
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE table>
<table id="messageList" cellspacing="0"
<table id="messageList"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
@ -15,12 +15,13 @@
height="14"/></td
><td class="tbtv_headercell sortableTableHeader" id="subjectHeader"
><var:string label:value="Subject"/></td
><td class="tbtv_headercell sortableTableHeader" id="fromHeader"
><var:if condition="showToAddress"
><td class="tbtv_headercell sortableTableHeader" id="toHeader"
><var:string label:value="To"/></td></var:if
><var:if condition="showToAddress" const:negate="YES"
><var:string label:value="From"/></var:if
><var:if condition="showToAddress"
><var:string label:value="To"/></var:if
></td
><td class="tbtv_headercell sortableTableHeader" id="fromHeader"
><var:string label:value="From"/></td
></var:if
><td class="tbtv_headercell" id="messageFlagHeader"
><img rsrc:src="title_read_14x14.png"/></td
><td class="tbtv_headercell sortableTableHeader" id="dateHeader"

View File

@ -539,9 +539,12 @@ function messageListCallback(http) {
var tbody = table.tBodies[0];
var tmp = document.createElement('div');
$(tmp).update(http.responseText);
thead.rows[1].parentNode.replaceChild(tmp.firstChild.tHead.rows[1], thead.rows[1]);
addressHeaderCell.replaceChild(tmp.firstChild.tHead.rows[0].cells[3].lastChild,
var newRows = tmp.firstChild.tHead.rows;
thead.rows[1].parentNode.replaceChild(newRows[1], thead.rows[1]);
addressHeaderCell.replaceChild(newRows[0].cells[3].lastChild,
addressHeaderCell.lastChild);
addressHeaderCell.setAttribute("id", newRows[0].cells[3].getAttribute("id"));
table.replaceChild(tmp.firstChild.tBodies[0], tbody);
}
else {
@ -1102,6 +1105,8 @@ function onHeaderClick(event) {
newSortAttribute = "subject";
else if (headerId == "fromHeader")
newSortAttribute = "from";
else if (headerId == "toHeader")
newSortAttribute = "to";
else if (headerId == "dateHeader")
newSortAttribute = "date";
else
@ -1208,8 +1213,7 @@ function configureMessageListEvents(table) {
if (table) {
table.multiselect = true;
// Each body row can load a message
table.observe("mousedown",
onMessageSelectionChange.bindAsEventListener(table));
table.observe("mousedown", onMessageSelectionChange);
// Sortable columns
configureSortableTableHeaders(table);
}

View File

@ -1435,8 +1435,8 @@ function onBodyClickContextMenu(event) {
function configureSortableTableHeaders(table) {
var headers = $(table).getElementsByClassName("sortableTableHeader");
for (var i = 0; i < headers.length; i++) {
var header = headers[i];
$(header).observe("click", onHeaderClick);
var header = $(headers[i]);
header.observe("click", onHeaderClick);
}
}