diff --git a/UI/WebServerResources/MailerUIdTree.js b/UI/WebServerResources/MailerUIdTree.js
index 591107cc3..77e50f3bb 100644
--- a/UI/WebServerResources/MailerUIdTree.js
+++ b/UI/WebServerResources/MailerUIdTree.js
@@ -1,66 +1,64 @@
-/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
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: _("InboxFolderName"),
- sent: _("SentFolderName"),
- draft: _("DraftsFolderName"),
- trash: _("TrashFolderName") },
- _addFolderNode: function (parent, name, fullName, type, unseen) {
- var icon = this.folderIcons[type];
- if (icon)
- icon = ResourcesURL + "/" + icon;
- else
- icon = "";
- var displayName = this.folderNames[type];
- var hasUnseen = false;
- if (!displayName)
- displayName = name;
- if (typeof unseen != "undefined") {
- hasUnseen = true;
- displayName += " (" + parseInt(unseen) + ")";
- }
- this.add(this.elementCounter, parent, displayName, 1, '#', fullName,
- type, '', '', icon, icon, hasUnseen);
- this.elementCounter++;
- },
- _addFolder: function (parent, folder) {
- var thisCounter = this.elementCounter;
- this._addFolderNode(parent, folder.displayName, folder.fullName(), folder.type, folder.unseen);
- for (var i = 0; i < folder.children.length; i++)
- this._addFolder(thisCounter, folder.children[i]);
- },
- addMailAccount: function (mailAccount) {
- this._addFolder(0, mailAccount);
- },
- setCookie: function(cookieName, cookieValue, expires, path, domain, secure) {
-
- },
- getCookie: function(cookieName) {
- return ("");
- },
- updateCookie: function () {
- if (Mailer.foldersStateTimer)
- clearTimeout(Mailer.foldersStateTimer);
- Mailer.foldersStateTimer = setTimeout('saveFoldersState()', 3000); // 3 seconds
- },
- 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);
- }
+ 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: _("InboxFolderName"),
+ sent: _("SentFolderName"),
+ draft: _("DraftsFolderName"),
+ trash: _("TrashFolderName") },
+ _addFolderNode: function (parent, name, fullName, type, unseen) {
+ var icon = this.folderIcons[type];
+ if (icon)
+ icon = ResourcesURL + "/" + icon;
+ else
+ icon = "";
+ var displayName = this.folderNames[type];
+ var hasUnseen = false;
+ if (!displayName)
+ displayName = name;
+ if (typeof unseen != "undefined") {
+ hasUnseen = true;
+ displayName += " (" + parseInt(unseen) + ")";
+ }
+ this.add(this.elementCounter, parent, displayName, 1, '#', fullName,
+ type, '', '', icon, icon, hasUnseen);
+ this.elementCounter++;
+ },
+ _addFolder: function (parent, folder) {
+ var thisCounter = this.elementCounter;
+ this._addFolderNode(parent, folder.displayName, folder.fullName(), folder.type, folder.unseen);
+ for (var i = 0; i < folder.children.length; i++)
+ this._addFolder(thisCounter, folder.children[i]);
+ },
+ addMailAccount: function (mailAccount) {
+ this._addFolder(0, mailAccount);
+ },
+ setCookie: function(cookieName, cookieValue, expires, path, domain, secure) {
+
+ },
+ getCookie: function(cookieName) {
+ return ("");
+ },
+ updateCookie: function () {
+ if (Mailer.foldersStateTimer)
+ clearTimeout(Mailer.foldersStateTimer);
+ Mailer.foldersStateTimer = setTimeout('saveFoldersState()', 3000); // 3 seconds
+ },
+ 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);
+ }
+ }
+ return expandedFolders.toJSON();
+ },
+ autoSync: function() {
+ this.config.useCookies = true;
}
- return expandedFolders.toJSON();
- },
- autoSync: function() {
- this.config.useCookies = true;
- }
};
Object.extend(dTree.prototype, MailerUIdTreeExtension);
diff --git a/UI/WebServerResources/dtree.js b/UI/WebServerResources/dtree.js
index b0527647c..804d192be 100644
--- a/UI/WebServerResources/dtree.js
+++ b/UI/WebServerResources/dtree.js
@@ -1,17 +1,16 @@
-/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*--------------------------------------------------|
- | dTree 2.05 | www.destroydrop.com/javascript/tree/ |
- |---------------------------------------------------|
- | Copyright (c) 2002-2003 Geir Landrö |
- | |
- | This script can be used freely as long as all |
- | copyright messages are intact. |
- | |
- | Updated: 17.04.2003 |
- |--------------------------------------------------*/
+ | dTree 2.05 | www.destroydrop.com/javascript/tree/ |
+ |---------------------------------------------------|
+ | Copyright (c) 2002-2003 Geir Landrö |
+ | |
+ | This script can be used freely as long as all |
+ | copyright messages are intact. |
+ | |
+ | Updated: 17.04.2003 |
+ |--------------------------------------------------*/
/* The content of attribute values should be quoted properly by using the
- equivalent entities. */
+ equivalent entities. */
function dTreeQuote(str) {
return (str
.replace(/&/g, "&")
@@ -23,48 +22,48 @@ function dTreeQuote(str) {
// Node object
function Node(id, pid, name, isParent, url, dataname, datatype, title, target,
icon, iconOpen, open, hasUnseen) {
- this.isParent = isParent;
- this.id = id;
- this.pid = pid;
- this.name = name;
- this.url = url;
- this.title = title;
- this.target = target;
- this.icon = icon;
- this.iconOpen = iconOpen;
- this.dataname = dataname;
- this.datatype = datatype;
- this.hasUnseen = hasUnseen;
- this._io = open || false;
- this._is = false;
- this._ls = false;
- this._hc = false;
- this._ai = 0;
- this._p;
+ this.isParent = isParent;
+ this.id = id;
+ this.pid = pid;
+ this.name = name;
+ this.url = url;
+ this.title = title;
+ this.target = target;
+ this.icon = icon;
+ this.iconOpen = iconOpen;
+ this.dataname = dataname;
+ this.datatype = datatype;
+ this.hasUnseen = hasUnseen;
+ this._io = open || false;
+ this._is = false;
+ this._ls = false;
+ this._hc = false;
+ this._ai = 0;
+ this._p;
};
// Tree object
function dTree(objName) {
this.obj = objName;
this.config = {
- target: null,
- useCookies: false
+ target: null,
+ useCookies: false
};
this.icon = {
- root: 'img/base.gif',
- folder: 'img/folder.gif',
- folderOpen: 'img/folderopen.gif',
- node: 'img/page.gif',
- empty: 'img/empty.gif',
- line: 'img/line.gif',
- join: 'img/join.gif',
- joinBottom: 'img/joinbottom.gif',
- plus: 'img/plus.gif',
- plusBottom: 'img/plusbottom.gif',
- minus: 'img/minus.gif',
- minusBottom: 'img/minusbottom.gif',
- nlPlus: 'img/nolines_plus.gif',
- nlMinus: 'img/nolines_minus.gif'
+ root: 'img/base.gif',
+ folder: 'img/folder.gif',
+ folderOpen: 'img/folderopen.gif',
+ node: 'img/page.gif',
+ empty: 'img/empty.gif',
+ line: 'img/line.gif',
+ join: 'img/join.gif',
+ joinBottom: 'img/joinbottom.gif',
+ plus: 'img/plus.gif',
+ plusBottom: 'img/plusbottom.gif',
+ minus: 'img/minus.gif',
+ minusBottom: 'img/minusbottom.gif',
+ nlPlus: 'img/nolines_plus.gif',
+ nlMinus: 'img/nolines_minus.gif'
};
this.images = {};
this.objects = {};
@@ -74,7 +73,7 @@ function dTree(objName) {
this.selectedNode = null;
this.selectedFound = false;
this.completed = false;
-
+
return this;
};
@@ -115,7 +114,7 @@ dTree.prototype = {
this.objects['namespan'] = new Element ("span", {"class": "nodeName"});
this.objects['image'] = new Element ("img");
},
-
+
// Open/close all nodes
openAll: function() {
@@ -131,7 +130,7 @@ dTree.prototype = {
div.id = this.obj;
div.addClassName ("dtree");
if (this.config.useCookies)
- this.selectedNode = this.getSelected();
+ this.selectedNode = this.getSelected();
this.addNode (this.root, div);
if (!this.selectedFound) this.selectedNode = null;
this.completed = true;
@@ -166,26 +165,26 @@ dTree.prototype = {
this.aNodes[nodeId] = node;
if (this.root.id != node.pid) {
var div = this.objects['nodediv'].cloneNode (true);
- if (node.datatype)
- div.writeAttribute ("datatype", dTreeQuote(node.datatype));
+ if (node.datatype)
+ div.writeAttribute ("datatype", dTreeQuote(node.datatype));
if (node.dataname)
- div.writeAttribute ("dataname", dTreeQuote(node.dataname));
+ div.writeAttribute ("dataname", dTreeQuote(node.dataname));
this.indent (node, nodeId, div);
var link = this.objects['nodelink'].cloneNode (true);
link.id = 's' + this.obj + nodeId;
link.href = dTreeQuote(node.url);
if (node.title)
- link.writeAttribute ("title", dTreeQuote(node.title));
+ link.writeAttribute ("title", dTreeQuote(node.title));
if (node.target)
- link.writeAttribute ("target", dTreeQuote(node.target));
+ link.writeAttribute ("target", dTreeQuote(node.target));
link.observe ("click", this.s.bindAsEventListener(this, parseInt(nodeId)));
- if (!node.icon)
- node.icon = (this.root.id == node.pid) ?
+ if (!node.icon)
+ node.icon = (this.root.id == node.pid) ?
this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
- if (!node.iconOpen)
- node.iconOpen = (node._hc) ?
+ if (!node.iconOpen)
+ node.iconOpen = (node._hc) ?
this.icon.folderOpen : this.icon.node;
if (this.root.id == node.pid) {
@@ -199,28 +198,28 @@ dTree.prototype = {
var span = this.objects['namespan'].cloneNode (true);
if (!node.isParent)
- span.addClassName ("leaf");
+ span.addClassName ("leaf");
if (node.hasUnseen)
- span.addClassName ("unseen");
+ span.addClassName ("unseen");
span.update (node.name);
link.appendChild (img);
link.appendChild (span);
div.appendChild (link);
if (container)
- container.appendChild (div);
+ container.appendChild (div);
else
- rc = div;
+ rc = div;
}
if (node._hc) {
var div = this.objects['clipdiv'].cloneNode (true);
div.id = 'd' + this.obj + nodeId;
- div.setStyle ({"display":
- ((this.root.id == node.pid || node._io) ?
- 'block' : 'none')});
+ div.setStyle ({"display":
+ ((this.root.id == node.pid || node._io) ?
+ 'block' : 'none')});
this.addNode(node, div);
if (container)
- container.appendChild (div);
+ container.appendChild (div);
}
this.aIndent.pop();
return rc;
@@ -230,8 +229,8 @@ dTree.prototype = {
indent: function(node, nodeId, container) {
if (this.root.id != node.pid) {
for (var n=0; n