Monotone-Parent: b4dce0cefe0dcb2486fbf6db19f6628a53b18241

Monotone-Revision: 2f18ff528db0316441209caab6d33ab4449bbe56

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-03-18T15:00:34
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-03-18 15:00:34 +00:00
parent 2cf6585e23
commit 8341e5fa45
11 changed files with 346 additions and 327 deletions

View File

@@ -128,11 +128,13 @@ function extractEmailAddress(mailTo) {
function extractEmailName(mailTo) {
var emailName = "";
var emailNamere = /(\w[\w\ _-]+)\ (&lt;|<)/;
var emailNamere = /(.+)\ </;
if (emailNamere.test(mailTo)) {
emailNamere.exec(mailTo);
emailName = RegExp.$1;
}
return emailName;
}
function sanitizeMailTo(dirtyMailTo) {
@@ -743,6 +745,33 @@ function initCriteria() {
}
}
/* toolbar buttons */
function popupToolbarMenu(event, menuId) {
var toolbar = $("toolbar");
var node = event.target;
if (node.tagName != 'A')
node = node.getParentWithTagName("a");
node = node.childNodesWithTag("span")[0];
if (event.button == 0) {
event.cancelBubble = true;
event.returnValue = false;
if (document.currentPopupMenu)
hideMenu(event, document.currentPopupMenu);
var popup = document.getElementById(menuId);
var top = node.offsetTop + node.offsetHeight - 2;
popup.style.top = top + "px";
popup.style.left = node.cascadeLeftOffset() + "px";
popup.style.visibility = "visible";
bodyOnClick = "" + document.body.getAttribute("onclick");
document.body.setAttribute("onclick", "onBodyClick('" + menuId + "');");
document.currentPopupMenu = popup;
}
}
/* contact selector */
function onContactAdd(node)
@@ -1024,3 +1053,7 @@ function initializeMenus() {
function onHeaderClick(event) {
window.alert("generic headerClick");
}
function parent$(element) {
return window.opener.document.getElementById(element);
}