mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 01:38:51 +00:00
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:
@@ -128,11 +128,13 @@ function extractEmailAddress(mailTo) {
|
||||
function extractEmailName(mailTo) {
|
||||
var emailName = "";
|
||||
|
||||
var emailNamere = /(\w[\w\ _-]+)\ (<|<)/;
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user