Monotone-Parent: 21947601e8d55a07243cb36a9943a7ddc4148e06
Monotone-Revision: 0aac806f5c69535395d7afe19450dab4f13e26ec Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-12-22T16:48:11 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
215a463847
commit
94740e186c
|
@ -49,6 +49,7 @@ function openMessageWindow(msguid, url) {
|
||||||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||||
|
|
||||||
msgWin.focus();
|
msgWin.focus();
|
||||||
|
markMailReadInWindow(window, msguid);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -56,9 +57,10 @@ function openMessageWindow(msguid, url) {
|
||||||
function onMessageDoubleClick(event) {
|
function onMessageDoubleClick(event) {
|
||||||
resetSelection(window);
|
resetSelection(window);
|
||||||
var msguid = this.parentNode.id.substr(4);
|
var msguid = this.parentNode.id.substr(4);
|
||||||
|
|
||||||
return openMessageWindow(msguid,
|
return openMessageWindow(msguid,
|
||||||
ApplicationBaseURL + currentMailbox + "/"
|
ApplicationBaseURL + currentMailbox + "/"
|
||||||
+ msguid + "/view");
|
+ msguid + "/popupview");
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleMailSelect(sender) {
|
function toggleMailSelect(sender) {
|
||||||
|
@ -388,17 +390,17 @@ function onMenuDeleteMessage(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMailboxTreeItemClick(element)
|
function onMailboxTreeItemClick(event) {
|
||||||
{
|
|
||||||
var topNode = $('d');
|
var topNode = $('d');
|
||||||
var mailbox = element.parentNode.getAttribute("dataname");
|
var mailbox = this.parentNode.getAttribute("dataname");
|
||||||
|
|
||||||
if (topNode.selectedEntry)
|
if (topNode.selectedEntry)
|
||||||
topNode.selectedEntry.deselect();
|
topNode.selectedEntry.deselect();
|
||||||
element.select();
|
this.select();
|
||||||
topNode.selectedEntry = element;
|
topNode.selectedEntry = this;
|
||||||
|
|
||||||
openMailbox(mailbox);
|
openMailbox(mailbox);
|
||||||
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshMailbox() {
|
function refreshMailbox() {
|
||||||
|
@ -518,7 +520,7 @@ function onMessageContextMenuHide(event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFolderMenuClick(event, element, menutype)
|
function onFolderMenuClick(event, menutype)
|
||||||
{
|
{
|
||||||
var onhide, menuName;
|
var onhide, menuName;
|
||||||
|
|
||||||
|
@ -541,8 +543,8 @@ function onFolderMenuClick(event, element, menutype)
|
||||||
topNode.selectedEntry.deselect();
|
topNode.selectedEntry.deselect();
|
||||||
if (topNode.menuSelectedEntry)
|
if (topNode.menuSelectedEntry)
|
||||||
topNode.menuSelectedEntry.deselect();
|
topNode.menuSelectedEntry.deselect();
|
||||||
topNode.menuSelectedEntry = element;
|
topNode.menuSelectedEntry = this;
|
||||||
element.select();
|
this.select();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFolderMenuHide(event)
|
function onFolderMenuHide(event)
|
||||||
|
@ -965,6 +967,22 @@ function configureDragHandles() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function configureDragHandles() {
|
||||||
|
var handle = $("verticalDragHandle");
|
||||||
|
if (handle) {
|
||||||
|
handle.addInterface(SOGoDragHandlesInterface);
|
||||||
|
handle.leftBlock=$("leftPanel");
|
||||||
|
handle.rightBlock=$("rightPanel");
|
||||||
|
}
|
||||||
|
|
||||||
|
handle = $("rightDragHandle");
|
||||||
|
if (handle) {
|
||||||
|
handle.addInterface(SOGoDragHandlesInterface);
|
||||||
|
handle.upperBlock=$("mailboxContent");
|
||||||
|
handle.lowerBlock=$("messageContent");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* dnd */
|
/* dnd */
|
||||||
function initDnd() {
|
function initDnd() {
|
||||||
log ("MailerUI initDnd");
|
log ("MailerUI initDnd");
|
||||||
|
@ -985,8 +1003,8 @@ function initDnd() {
|
||||||
nodes[i].dndAcceptType = mailboxSpanAcceptType;
|
nodes[i].dndAcceptType = mailboxSpanAcceptType;
|
||||||
nodes[i].dndEnter = mailboxSpanEnter;
|
nodes[i].dndEnter = mailboxSpanEnter;
|
||||||
nodes[i].dndExit = mailboxSpanExit;
|
nodes[i].dndExit = mailboxSpanExit;
|
||||||
nodes[i].dndDrop = mailboxSpanDrop;
|
nodes[i].dndDrop = mailboxSpanDrop;
|
||||||
document.DNDManager.registerDestination(nodes[i]);
|
document.DNDManager.registerDestination(nodes[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1000,6 +1018,20 @@ var initMailer = {
|
||||||
handleEvent: function (event) {
|
handleEvent: function (event) {
|
||||||
configureMessageListEvents();
|
configureMessageListEvents();
|
||||||
initDnd();
|
initDnd();
|
||||||
|
var tree = $("d");
|
||||||
|
var nodes = document.getElementsByClassName("node", tree);
|
||||||
|
nodes = nodes.concat(document.getElementsByClassName("nodeSel", tree));
|
||||||
|
for (i = 0; i < nodes.length; i++) {
|
||||||
|
nodes[i].addEventListener("click", onMailboxTreeItemClick, false);
|
||||||
|
nodes[i].addEventListener("contextmenu", onFolderMenuClick, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
, 'onMailboxTreeItemClick(this);'
|
||||||
|
<!-- if (typeof(node.datatype) != "undefined") str += ' oncontextmenu="onFolderMenuClick(event, this);"';
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1047,8 +1047,7 @@ function initializeMenus() {
|
||||||
"appointmentsListMenu", "calendarsMenu", "searchMenu");
|
"appointmentsListMenu", "calendarsMenu", "searchMenu");
|
||||||
initMenusNamed(menus);
|
initMenusNamed(menus);
|
||||||
|
|
||||||
var calendarsList = $("calendarsList");
|
$("calendarsList").attachMenu("calendarsMenu");
|
||||||
calendarsList.attachMenu("calendarsMenu");
|
|
||||||
|
|
||||||
var accessRightsMenuEntry = $("accessRightsMenuEntry");
|
var accessRightsMenuEntry = $("accessRightsMenuEntry");
|
||||||
accessRightsMenuEntry.addEventListener("mouseup",
|
accessRightsMenuEntry.addEventListener("mouseup",
|
||||||
|
|
|
@ -10,14 +10,13 @@
|
||||||
|--------------------------------------------------*/
|
|--------------------------------------------------*/
|
||||||
|
|
||||||
// Node object
|
// Node object
|
||||||
function Node(id, pid, name, isParent, url, onclick, dataname, datatype, title, target,
|
function Node(id, pid, name, isParent, url, dataname, datatype, title, target,
|
||||||
icon, iconOpen, open) {
|
icon, iconOpen, open) {
|
||||||
this.isParent = isParent;
|
this.isParent = isParent;
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.onclick = onclick;
|
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
|
@ -72,9 +71,9 @@ function dTree(objName) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Adds a new node to the node array
|
// Adds a new node to the node array
|
||||||
dTree.prototype.add = function(id, pid, name, isParent, url, onclick, datatype,
|
dTree.prototype.add = function(id, pid, name, isParent, url, datatype,
|
||||||
title, target, icon, iconOpen, open) {
|
title, target, icon, iconOpen, open) {
|
||||||
this.aNodes[this.aNodes.length] = new Node(id, pid, name, isParent, url, onclick,
|
this.aNodes[this.aNodes.length] = new Node(id, pid, name, isParent, url,
|
||||||
datatype, title, target, icon,
|
datatype, title, target, icon,
|
||||||
iconOpen, open);
|
iconOpen, open);
|
||||||
};
|
};
|
||||||
|
@ -138,8 +137,6 @@ dTree.prototype.node = function(node, nodeId) {
|
||||||
str += '>' + this.indent(node, nodeId);
|
str += '>' + this.indent(node, nodeId);
|
||||||
if (node.url) {
|
if (node.url) {
|
||||||
str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
|
str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
|
||||||
if (node.onclick) str += ' onclick="' + node.onclick + '"';
|
|
||||||
if (typeof(node.datatype) != "undefined") str += ' oncontextmenu="onFolderMenuClick(event, this);"';
|
|
||||||
if (node.title) str += ' title="' + node.title + '"';
|
if (node.title) str += ' title="' + node.title + '"';
|
||||||
if (node.target) str += ' target="' + node.target + '"';
|
if (node.target) str += ' target="' + node.target + '"';
|
||||||
if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
|
if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
|
||||||
|
|
|
@ -965,6 +965,7 @@ var onLoadHandler = {
|
||||||
if (!document.body.hasClassName("popup")) {
|
if (!document.body.hasClassName("popup")) {
|
||||||
initLogConsole();
|
initLogConsole();
|
||||||
initializeMenus();
|
initializeMenus();
|
||||||
|
initCriteria();
|
||||||
}
|
}
|
||||||
initTabs();
|
initTabs();
|
||||||
configureDragHandles();
|
configureDragHandles();
|
||||||
|
|
Loading…
Reference in a new issue