mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-16 12:05:56 +00:00
Monotone-Parent: d2bec7005b1132e0cdbaba9d59a590f4f9b95b6b
Monotone-Revision: 7cc3351f7b4c30b2183e351afaf429ade9f6ab9b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-28T14:48:45 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,57 +1,59 @@
|
||||
/* -*- Mode: java; tab-width: 2; c-tab-always-indent: t; indent-tabs-mode: t; c-basic-offset: 2 -*- */
|
||||
|
||||
var MailerUIdTreeExtension = {
|
||||
elementCounter: 1,
|
||||
folderIcons: { account: "tbtv_account_17x17.png",
|
||||
inbox: "tbtv_inbox_17x17.png",
|
||||
sent: "tbtv_sent_17x17.png",
|
||||
draft: "tbtv_drafts_17x17.png",
|
||||
trash: "tbtv_trash_17x17.png" },
|
||||
folderNames: { inbox: labels["InboxFolderName"],
|
||||
sent: labels["SentFolderName"],
|
||||
draft: labels["DraftsFolderName"],
|
||||
trash: labels["TrashFolderName"] },
|
||||
_addFolderNode: function (parent, name, fullName, type) {
|
||||
var icon = this.folderIcons[type];
|
||||
if (icon)
|
||||
icon = ResourcesURL + "/" + icon;
|
||||
else
|
||||
icon = "";
|
||||
var displayName = this.folderNames[type];
|
||||
if (!displayName)
|
||||
displayName = name;
|
||||
this.add(this.elementCounter, parent, displayName, 1, '#', fullName,
|
||||
type, '', '', icon, icon);
|
||||
this.elementCounter++;
|
||||
},
|
||||
_addFolder: function (parent, folder) {
|
||||
var thisCounter = this.elementCounter;
|
||||
this._addFolderNode(parent, folder.name, folder.fullName(), folder.type);
|
||||
for (var i = 0; i < folder.children.length; i++)
|
||||
elementCounter: 1,
|
||||
folderIcons: { account: "tbtv_account_17x17.png",
|
||||
inbox: "tbtv_inbox_17x17.png",
|
||||
sent: "tbtv_sent_17x17.png",
|
||||
draft: "tbtv_drafts_17x17.png",
|
||||
trash: "tbtv_trash_17x17.png" },
|
||||
folderNames: { inbox: labels["InboxFolderName"],
|
||||
sent: labels["SentFolderName"],
|
||||
draft: labels["DraftsFolderName"],
|
||||
trash: labels["TrashFolderName"] },
|
||||
_addFolderNode: function (parent, name, fullName, type) {
|
||||
var icon = this.folderIcons[type];
|
||||
if (icon)
|
||||
icon = ResourcesURL + "/" + icon;
|
||||
else
|
||||
icon = "";
|
||||
var displayName = this.folderNames[type];
|
||||
if (!displayName)
|
||||
displayName = name;
|
||||
this.add(this.elementCounter, parent, displayName, 1, '#', fullName,
|
||||
type, '', '', icon, icon);
|
||||
this.elementCounter++;
|
||||
},
|
||||
_addFolder: function (parent, folder) {
|
||||
var thisCounter = this.elementCounter;
|
||||
this._addFolderNode(parent, folder.name, folder.fullName(), folder.type);
|
||||
for (var i = 0; i < folder.children.length; i++)
|
||||
this._addFolder(thisCounter, folder.children[i]);
|
||||
},
|
||||
addMailAccount: function (mailAccount) {
|
||||
this._addFolder(0, mailAccount);
|
||||
},
|
||||
addMailAccount: function (mailAccount) {
|
||||
this._addFolder(0, mailAccount);
|
||||
},
|
||||
setCookie: function(cookieName, cookieValue, expires, path, domain, secure) {
|
||||
setCookie: function(cookieName, cookieValue, expires, path, domain, secure) {
|
||||
|
||||
},
|
||||
getCookie: function(cookieName) {
|
||||
getCookie: function(cookieName) {
|
||||
return ("");
|
||||
},
|
||||
updateCookie: function () {
|
||||
updateCookie: function () {
|
||||
if (Mailer.foldersStateTimer)
|
||||
clearTimeout(Mailer.foldersStateTimer);
|
||||
Mailer.foldersStateTimer = setTimeout('saveFoldersState()', 3000); // 3 seconds
|
||||
},
|
||||
getFoldersState: function () {
|
||||
getFoldersState: function () {
|
||||
var expandedFolders = new Array();
|
||||
for (var n = 0; n < this.aNodes.length; n++) {
|
||||
if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {
|
||||
expandedFolders.push(this.aNodes[n].dataname);
|
||||
expandedFolders.push(this.aNodes[n].dataname);
|
||||
}
|
||||
}
|
||||
return expandedFolders.toJSON();
|
||||
},
|
||||
autoSync: function() {
|
||||
autoSync: function() {
|
||||
this.config.useCookies = true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user