diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 17ccee840..eee9430bf 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -42,7 +42,7 @@ var currentContactFolder = ''; function openContactWindow(sender, contactuid, url) { log ("message window at url: " + url); var msgWin = window.open(url, "SOGo_msg_" + contactuid, - "width=640,height=480,resizable=1,scrollbars=1,toolbar=0," + + "width=546,height=490,resizable=1,scrollbars=1,toolbar=0," + "location=0,directories=0,status=0,menubar=0,copyhistory=0"); msgWin.focus(); @@ -607,3 +607,7 @@ function onConfirmContactSelection() return false; } + +function onContactMailTo(node) { + return openMailTo(node.innerHTML); +} diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index ec57b5192..e45003462 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -822,18 +822,7 @@ function newContactFromEmail(sender) { } function newEmailTo(sender) { - var mailto = sanitizeMailTo(sender.parentNode.parentNode.menuTarget.innerHTML); - - if (mailto.length > 0) - { - w = window.open("compose?mailto=" + mailto, - "SOGo_compose", - "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + - "location=0,directories=0,status=0,menubar=0,copyhistory=0"); - w.focus(); - } - - return false; /* stop following the link */ + return openMailTo(sender.parentNode.parentNode.menuTarget.innerHTML); } function expandUpperTree(node) diff --git a/UI/WebServerResources/UIxContactEditor.js b/UI/WebServerResources/UIxContactEditor.js index abf74d9bb..2d371b5d5 100644 --- a/UI/WebServerResources/UIxContactEditor.js +++ b/UI/WebServerResources/UIxContactEditor.js @@ -81,3 +81,22 @@ function validateContactEditor() { return true; } + +function submitContact(thisForm) { + var action = document.getElementById('jsaction'); + action.setAttribute("name", "save:method"); + action.setAttribute("value", "save"); + + window.opener.log ("form: " + thisForm); + + window.opener.log ("validating..."); + if (validateContactEditor()) { + window.opener.log ("submitting"); + thisForm.submit(); + window.opener.log ("setting timeout..."); + window.opener.setTimeout('refreshAppointments();', 200); + window.opener.log ("we close..."); + window.close(); + window.opener.log ("closed"); + } +} diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index a56e1c1b7..171e2d9e3 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -146,6 +146,21 @@ function sanitizeMailTo(dirtyMailTo) { return mailto; } +function openMailTo(senderMailto) { + var mailto = sanitizeMailTo(senderMailto); + + if (mailto.length > 0) + { + w = window.open(ApplicationBaseURL + "/../Mail/compose?mailto=" + mailto, + "SOGo_compose", + "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + + "location=0,directories=0,status=0,menubar=0,copyhistory=0"); + w.focus(); + } + + return false; /* stop following the link */ +} + function createHTTPClient() { // http://developer.apple.com/internet/webcontent/xmlhttpreq.html if (typeof XMLHttpRequest != "undefined") @@ -965,6 +980,10 @@ function onTabMouseDown(event) { return false; } +function openExternalLink(anchor) { + return false; +} + function onTabClick(event) { var node = event.target;