Monotone-Parent: c15520706f33ccebb112c1becc433bfe47acd1ee

Monotone-Revision: e00080932f4ede008b94710aac6b0477a9b70141

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-04-27T19:41:04
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-04-27 19:41:04 +00:00
parent 63ccf073b4
commit a251c4da7e
5 changed files with 34 additions and 29 deletions

View File

@@ -1,5 +1,3 @@
window.addEventListener("load", onComponentEditorLoad, false);
function onPopupAttendeesWindow(event) {
if (event)
event.preventDefault();
@@ -51,16 +49,14 @@ function onPopupDocumentWindow(event) {
return false;
}
function onMenuSetClassification(event, classification) {
function onMenuSetClassification(event) {
event.cancelBubble = true;
var node = event.target;
if (node.tagName != "LI")
node = node.getParentWithTagName("li");
if (node.parentNode.chosenNode)
node.parentNode.chosenNode.removeClassName("_chosen");
node.addClassName("_chosen");
node.parentNode.chosenNode = node;
var classification = this.getAttribute("classification");
if (this.parentNode.chosenNode)
this.parentNode.chosenNode.removeClassName("_chosen");
this.addClassName("_chosen");
this.parentNode.chosenNode = this;
log("classification: " + classification);
var privacyInput = document.getElementById("privacy");
@@ -157,4 +153,10 @@ function onComponentEditorLoad(event) {
var onSelectionChangeEvent = document.createEvent("Event");
onSelectionChangeEvent.initEvent("change", false, false);
list.dispatchEvent(onSelectionChangeEvent);
var menuItems = $("itemPrivacyList").childNodesWithTag("li");
for (var i = 0; i < menuItems.length; i++)
menuItems[i].addEventListener("mouseup", onMenuSetClassification, false);
}
window.addEventListener("load", onComponentEditorLoad, false);