See ChangeLog

Monotone-Parent: f46a82535044ebae377ca25229db810ded914ae0
Monotone-Revision: 42caf855ed6371b609cb372b49a7c45444fc18e6

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-03-21T22:00:49
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2011-03-21 22:00:49 +00:00
parent 8a2181a9b5
commit 112072d3f4
2 changed files with 24 additions and 0 deletions

View File

@ -13,6 +13,10 @@
(displayAccountSignature): strips the tags and unescape the HTML
to improve readability.
* UI/WebServerResources/MailerUI.js (updateWindowTitle): new
function used to update the window title with respect to the
currently selected mailbox.
2011-03-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreCalendarMessage.m

View File

@ -5,6 +5,7 @@ var accounts = [];
var mailboxTree;
var Mailer = {
defaultWindowTitle: null,
currentMailbox: null,
currentMailboxType: "",
currentMessages: {},
@ -564,6 +565,7 @@ function onMailboxTreeItemClick(event) {
$("messageContent").innerHTML = '';
$("messageCountHeader").childNodes[0].innerHTML = '&nbsp;';
Mailer.dataTable._emptyTable();
updateWindowTitle();
}
else {
var datatype = this.parentNode.getAttribute("datatype");
@ -572,6 +574,7 @@ function onMailboxTreeItemClick(event) {
else
toggleAddressColumn("to", "from");
updateWindowTitle(this.childNodesWithTag("span")[0]);
openMailbox(mailbox);
}
@ -900,6 +903,8 @@ function updateUnseenCount(node, count, isDelta) {
counterSpan.addClassName("hidden");
unseenSpan.removeClassName("unseen");
}
if (node.getAttribute("dataname") == Mailer.currentMailbox)
updateWindowTitle(unseenSpan);
}
}
@ -917,6 +922,21 @@ function updateMessageListCounter(count, isDelta) {
cell.update(_("No message"));
}
function updateWindowTitle(span) {
if (!Mailer.defaultWindowTitle)
Mailer.defaultWindowTitle = document.title || "SOGo";
else if (!span)
document.title = Mailer.defaultWindowTitle;
if (span) {
var title = Mailer.defaultWindowTitle + " - ";
if (span.hasClassName("unseen"))
title += span.innerHTML.stripTags();
else
title += span.childNodes[0].nodeValue;
document.title = title;
}
}
/* Function is called when the event datatable:rendered is fired from SOGoDataTable. */
function onMessageListRender(event) {
// Restore previous selection