diff --git a/ChangeLog b/ChangeLog index fec9ef663..96203bf7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-03-29 Wolfgang Sourdeau + * UI/WebServerResources/UIxMailEditor.js: moved previous generic + method "onContactAdd" here since the Mailer is now the only module + to use it when composing emails. + * UI/WebServerResources/generic.js: added code for handling the new scheme used for describing SOGo folders, common code to handle folder addition or removal. diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index cde06ab8f..839d8991f 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -1,5 +1,24 @@ var contactSelectorAction = 'mailer-contacts'; +function onContactAdd() { + var selector = null; + var selectorURL = '?popup=YES&selectorId=mailer-contacts'; + + urlstr = ApplicationBaseURL; + if (urlstr[urlstr.length-1] != '/') + urlstr += '/'; + urlstr += ("../../" + UserLogin + "/Contacts/" + + contactSelectorAction + selectorURL); +// log (urlstr); + var w = window.open(urlstr, "Addressbook", + "width=640,height=400,resizable=1,scrollbars=0"); + w.selector = selector; + w.opener = this; + w.focus(); + + return false; + } + function addContact(tag, fullContactName, contactId, contactName, contactEmail) { if (!mailIsRecipient(contactEmail)) { var neededOptionValue = 0;