Monotone-Parent: 21947601e8d55a07243cb36a9943a7ddc4148e06
Monotone-Revision: 0aac806f5c69535395d7afe19450dab4f13e26ec Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-12-22T16:48:11 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
215a463847
commit
94740e186c
|
@ -49,6 +49,7 @@ function openMessageWindow(msguid, url) {
|
|||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
|
||||
msgWin.focus();
|
||||
markMailReadInWindow(window, msguid);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -56,9 +57,10 @@ function openMessageWindow(msguid, url) {
|
|||
function onMessageDoubleClick(event) {
|
||||
resetSelection(window);
|
||||
var msguid = this.parentNode.id.substr(4);
|
||||
|
||||
return openMessageWindow(msguid,
|
||||
ApplicationBaseURL + currentMailbox + "/"
|
||||
+ msguid + "/view");
|
||||
+ msguid + "/popupview");
|
||||
}
|
||||
|
||||
function toggleMailSelect(sender) {
|
||||
|
@ -388,17 +390,17 @@ function onMenuDeleteMessage(event) {
|
|||
event.preventDefault();
|
||||
}
|
||||
|
||||
function onMailboxTreeItemClick(element)
|
||||
{
|
||||
function onMailboxTreeItemClick(event) {
|
||||
var topNode = $('d');
|
||||
var mailbox = element.parentNode.getAttribute("dataname");
|
||||
var mailbox = this.parentNode.getAttribute("dataname");
|
||||
|
||||
if (topNode.selectedEntry)
|
||||
topNode.selectedEntry.deselect();
|
||||
element.select();
|
||||
topNode.selectedEntry = element;
|
||||
this.select();
|
||||
topNode.selectedEntry = this;
|
||||
|
||||
openMailbox(mailbox);
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function refreshMailbox() {
|
||||
|
@ -518,7 +520,7 @@ function onMessageContextMenuHide(event)
|
|||
}
|
||||
}
|
||||
|
||||
function onFolderMenuClick(event, element, menutype)
|
||||
function onFolderMenuClick(event, menutype)
|
||||
{
|
||||
var onhide, menuName;
|
||||
|
||||
|
@ -541,8 +543,8 @@ function onFolderMenuClick(event, element, menutype)
|
|||
topNode.selectedEntry.deselect();
|
||||
if (topNode.menuSelectedEntry)
|
||||
topNode.menuSelectedEntry.deselect();
|
||||
topNode.menuSelectedEntry = element;
|
||||
element.select();
|
||||
topNode.menuSelectedEntry = this;
|
||||
this.select();
|
||||
}
|
||||
|
||||
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 */
|
||||
function initDnd() {
|
||||
log ("MailerUI initDnd");
|
||||
|
@ -985,8 +1003,8 @@ function initDnd() {
|
|||
nodes[i].dndAcceptType = mailboxSpanAcceptType;
|
||||
nodes[i].dndEnter = mailboxSpanEnter;
|
||||
nodes[i].dndExit = mailboxSpanExit;
|
||||
nodes[i].dndDrop = mailboxSpanDrop;
|
||||
document.DNDManager.registerDestination(nodes[i]);
|
||||
nodes[i].dndDrop = mailboxSpanDrop;
|
||||
document.DNDManager.registerDestination(nodes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1000,6 +1018,20 @@ var initMailer = {
|
|||
handleEvent: function (event) {
|
||||
configureMessageListEvents();
|
||||
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");
|
||||
initMenusNamed(menus);
|
||||
|
||||
var calendarsList = $("calendarsList");
|
||||
calendarsList.attachMenu("calendarsMenu");
|
||||
$("calendarsList").attachMenu("calendarsMenu");
|
||||
|
||||
var accessRightsMenuEntry = $("accessRightsMenuEntry");
|
||||
accessRightsMenuEntry.addEventListener("mouseup",
|
||||
|
|
|
@ -10,14 +10,13 @@
|
|||
|--------------------------------------------------*/
|
||||
|
||||
// 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) {
|
||||
this.isParent = isParent;
|
||||
this.id = id;
|
||||
this.pid = pid;
|
||||
this.name = name;
|
||||
this.url = url;
|
||||
this.onclick = onclick;
|
||||
this.title = title;
|
||||
this.target = target;
|
||||
this.icon = icon;
|
||||
|
@ -72,9 +71,9 @@ function dTree(objName) {
|
|||
};
|
||||
|
||||
// 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) {
|
||||
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,
|
||||
iconOpen, open);
|
||||
};
|
||||
|
@ -138,8 +137,6 @@ dTree.prototype.node = function(node, nodeId) {
|
|||
str += '>' + this.indent(node, nodeId);
|
||||
if (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.target) str += ' target="' + node.target + '"';
|
||||
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")) {
|
||||
initLogConsole();
|
||||
initializeMenus();
|
||||
initCriteria();
|
||||
}
|
||||
initTabs();
|
||||
configureDragHandles();
|
||||
|
|
Loading…
Reference in New Issue