mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-10 02:45:08 +00:00
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
This commit is contained in:
@@ -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 = ' ';
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user