Monotone-Parent: 2519a63de2bcf36a1f0aeeece831f277cf94934c

Monotone-Revision: 42e111d1ab25686092e392def5b8aa0c22f4d88b

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-04T20:01:53
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-06-04 20:01:53 +00:00
parent b23dfcf23a
commit df229b29fd
2 changed files with 12 additions and 8 deletions

View File

@@ -53,10 +53,8 @@
><td colspan="6" class="tbtv_navcell"
><var:if condition="hasPrevious">
<a href="#"
onclick="openMailboxAtIndex(this);"
idx="1"><var:string label:value="first"/></a> |
<a href="#"
onclick="openMailboxAtIndex(this);"
var:idx="prevFirstMessageNumber"
><var:string label:value="previous"/></a> |
</var:if>
@@ -67,7 +65,6 @@
<var:string value="sortedUIDs.count" />
<var:if condition="hasNext"
>| <a href="#"
onclick="openMailboxAtIndex(this);"
var:idx="nextFirstMessageNumber"
><var:string label:value="next" /></a>
</var:if

View File

@@ -463,8 +463,8 @@ function openMailbox(mailbox, reload) {
// triggerAjaxRequest(mailbox, 'toolbar', toolbarCallback);
}
function openMailboxAtIndex(element) {
var idx = element.getAttribute("idx");
function openMailboxAtIndex(event) {
var idx = this.getAttribute("idx");
var url = ApplicationBaseURL + currentMailbox + "/view?noframe=1&idx=" + idx;
if (document.messageListAjaxRequest) {
@@ -474,7 +474,7 @@ function openMailboxAtIndex(element) {
document.messageListAjaxRequest
= triggerAjaxRequest(url, messageListCallback);
return false;
event.preventDefault();
}
function messageListCallback(http) {
@@ -939,9 +939,16 @@ function configureMessageListEvents() {
var rows = messageList.tBodies[0].rows;
var start = 0;
if (rows.length > 1) {
while (rows[start].cells[0].hasClassName("tbtv_headercell")
|| rows[start].cells[0].hasClassName("tbtv_navcell"))
if (rows[start].cells[0].hasClassName("tbtv_headercell"))
start++;
if (rows[start].cells[0].hasClassName("tbtv_navcell")) {
log("start:" + start);
var anchors = $(rows[start].cells[0]).childNodesWithTag("a");
log("nr anchors: " + anchors.length);
for (var i = 0; i < anchors.length; i++)
Event.observe(anchors[i], "click", openMailboxAtIndex);
start++;
}
for (var i = start; i < rows.length; i++) {
Event.observe(rows[i], "mousedown", onRowClick);
Event.observe(rows[i], "contextmenu", onMessageContextMenu);