Monotone-Parent: cd791802b57399943d944e80382992d9a7043113
Monotone-Revision: 285b909701dbd3013603eaa63851c1a2b4fa6901 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-09-19T21:11:53 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
8d28274c90
commit
712517a656
|
@ -801,20 +801,29 @@ function onMenuDeleteMessage(event)
|
||||||
|
|
||||||
/* contacts */
|
/* contacts */
|
||||||
function newContactFromEmail(sender) {
|
function newContactFromEmail(sender) {
|
||||||
|
var mailto = sender.parentNode.parentNode.menuTarget.innerHTML;
|
||||||
|
|
||||||
var emailre
|
var emailre
|
||||||
= /([a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])/g;
|
= /([a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])/g;
|
||||||
|
emailre.exec(mailto);
|
||||||
emailre.exec(sender.parentNode.parentNode.menuTarget.innerHTML);
|
|
||||||
email = RegExp.$1;
|
email = RegExp.$1;
|
||||||
|
|
||||||
|
var namere = /(\w[\w\ _-]+)\ (<|<)/;
|
||||||
|
var c_name = '';
|
||||||
|
if (namere.test(mailto)) {
|
||||||
|
namere.exec(mailto);
|
||||||
|
c_name += RegExp.$1;
|
||||||
|
}
|
||||||
|
|
||||||
if (email.length > 0)
|
if (email.length > 0)
|
||||||
{
|
{
|
||||||
emailre.exec("");
|
emailre.exec("");
|
||||||
w = window.open(UserFolderURL + "Contacts/new?contactEmail=" + email,
|
var url = UserFolderURL + "Contacts/new?contactEmail=" + email;
|
||||||
"SOGo_new_contact",
|
if (c_name)
|
||||||
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
|
url += "&contactFN=" + c_name;
|
||||||
+ "location=0,directories=0,status=0,menubar=0,"
|
w = window.open(url, null,
|
||||||
+ "copyhistory=0");
|
"width=546,height=490,resizable=1,scrollbars=1,toolbar=0,"
|
||||||
|
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||||
w.focus();
|
w.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue