diff --git a/UI/MailerUI/Toolbars/SOGoDraftObject.toolbar b/UI/MailerUI/Toolbars/SOGoDraftObject.toolbar
index 2a7ef183b..d8bba1f0a 100644
--- a/UI/MailerUI/Toolbars/SOGoDraftObject.toolbar
+++ b/UI/MailerUI/Toolbars/SOGoDraftObject.toolbar
@@ -1,24 +1,27 @@
( /* the toolbar groups -*-cperl-*- */
( /* first group */
- { link = "#"; isSafe = NO;
+ { link = "#";
+ isSafe = NO;
onclick = "clickedEditorSend(this);return false;";
image = "tb-compose-send-flat-24x24.png";
- cssClass = "tbicon_send"; label = "Send"; },
- { link = "#"; target = "addressbook";
- onclick = "openAddressbook(this);return false;";
+ cssClass = "tbicon_send";
+ label = "Send"; },
+ { link = "#";
+ onclick = "return onContactAdd(null);";
image = "tb-compose-contacts-flat-24x24.png";
- cssClass = "tbicon_addressbook"; label = "Contacts"; },
-/* { link = "#"; target = "anais";
- onclick = "openAnais(this);return false;";
- image = "tbtb_anais.png";
- cssClass = "tbicon_anais"; label = "Anais"; }, */
- { link = "#"; isSafe = NO;
+ cssClass = "tbicon_addressbook";
+ label = "Contacts"; },
+ { link = "#";
+ isSafe = NO;
onclick = "clickedEditorAttach(this)";
image = "tb-compose-attach-flat-24x24.png";
- cssClass = "tbicon_attach"; label = "Attach"; },
- { link = "#"; isSafe = NO;
+ cssClass = "tbicon_attach";
+ label = "Attach"; },
+ { link = "#";
+ isSafe = NO;
onclick = "clickedEditorSave(this);return false;";
image = "tb-mail-file-flat-24x24.png";
- cssClass = "tbicon_save"; label = "Save"; },
+ cssClass = "tbicon_save";
+ label = "Save"; },
)
)
diff --git a/UI/MailerUI/Toolbars/SOGoMailObject.toolbar b/UI/MailerUI/Toolbars/SOGoMailObject.toolbar
index 8c9281992..0dad4b372 100644
--- a/UI/MailerUI/Toolbars/SOGoMailObject.toolbar
+++ b/UI/MailerUI/Toolbars/SOGoMailObject.toolbar
@@ -4,11 +4,10 @@
{ link = "getMail";
image = "tb-mail-getmail-flat-24x24.png";
cssClass = "tbicon_getmail"; label = "Get Mail"; },
-
- { link = "#"; // "compose"; // target = "_blank";
+ { link = "#";
isSafe = NO;
image = "tb-mail-write-flat-24x24.png";
- onclick = "clickedCompose(this);return false;";
+ onclick = "return openMessageWindow(null, 'compose');";
cssClass = "tbicon_compose"; label = "Write"; },
{ link = "#"; target = "addressbook";
onclick = "openAddressbook(this);return false;";
@@ -18,19 +17,19 @@
( // second group
{ link = "reply";
- onclick = "return onMenuReplyToSender(event);";
+ onclick = "return openMessageWindowsForSelection('reply');";
isSafe = NO;
image = "tb-mail-reply-flat-24x24.png";
cssClass = "tbicon_reply"; label = "Reply"; },
{ link = "replyall";
- onclick = "return onMenuReplyToAll(event);";
+ onclick = "return openMessageWindowsForSelection('replyall');";
isSafe = NO;
image = "tb-mail-replyall-flat-24x24.png";
cssClass = "tbicon_replyall"; label = "Reply All"; },
{ link = "forward";
- onclick = "return onMenuForwardMessage(event);";
+ onclick = "return openMessageWindowsForSelection('forward');";
isSafe = NO;
image = "tb-mail-forward-flat-24x24.png";
cssClass = "tbicon_forward"; label = "Forward"; },
diff --git a/UI/MailerUI/product.plist b/UI/MailerUI/product.plist
index 6eca7c7c1..fae4d24f2 100644
--- a/UI/MailerUI/product.plist
+++ b/UI/MailerUI/product.plist
@@ -298,7 +298,7 @@
{
link = "#"; // "compose"; // target = "_blank";
isSafe = NO;
- onclick = "clickedCompose(this);return false;";
+ onclick = "return openMessageWindow(null, 'compose');";
image = "tb-mail-write-flat-24x24.png";
cssClass = "tbicon_compose"; label = "Write"; },
)
diff --git a/UI/Templates/ContactsUI/UIxContactsListView.wox b/UI/Templates/ContactsUI/UIxContactsListView.wox
index 093a8b7de..9b34236a4 100644
--- a/UI/Templates/ContactsUI/UIxContactsListView.wox
+++ b/UI/Templates/ContactsUI/UIxContactsListView.wox
@@ -8,6 +8,7 @@
xmlns:rsrc="OGo:url"
className="UIxContactsListViewContainer"
title="name"
+ var:popup="isPopup"
>
diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js
index 3ea754bf7..34d3c2916 100644
--- a/UI/WebServerResources/ContactsUI.js
+++ b/UI/WebServerResources/ContactsUI.js
@@ -38,7 +38,6 @@ var currentContactFolder = '';
/* mail list */
function openContactWindow(sender, url) {
- log ("message window at url: " + url);
var msgWin = window.open(url, null,
"width=544,height=525,resizable=1,scrollbars=1,toolbar=0,"
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
@@ -111,7 +110,6 @@ function openContactsFolder(contactsFolder, params)
if (params)
url += '&' + params;
- log ("reload url = '" + url + "'");
var selection;
if (document.contactsListAjaxRequest) {
document.contactsListAjaxRequest.aborted = true;
@@ -261,12 +259,7 @@ function moveTo(uri) {
/* contact menu entries */
function onContactRowClick(event, node)
{
- var contactId = node.getAttribute('id');
-
- loadContact(contactId);
- log ("clicked contact: " + contactId);
-// changeCalendarDisplay(day);
-// changeDateSelectorDisplay(day);
+ loadContact(node.getAttribute('id'));
return onRowClick(event);
}
@@ -406,7 +399,6 @@ function onHeaderClick(node)
url = ApplicationBaseURL + currentContactFolder + "/" + href;
if (!href.match(/noframe=/))
url += "&noframe=1";
- log ("url: " + url);
document.contactsListAjaxRequest
= triggerAjaxRequest(url, contactsListCallback);
@@ -445,7 +437,7 @@ function onSearchFormSubmit()
return false;
}
-function onConfirmContactSelection()
+function onConfirmContactSelection(tag)
{
var folderLi = $(currentContactFolder);
var currentContactFolderName = folderLi.innerHTML;
@@ -455,15 +447,10 @@ function onConfirmContactSelection()
for (i = 0; i < rows.length; i++)
{
var cid = rows[i].getAttribute("contactid");
- if (cid)
- {
- var cname = '' + rows[i].getAttribute("contactname");
- log('cid = ' + cid + '; cname = ' + cname );
- if (cid.length > 0)
- opener.window.addContact(contactSelectorId,
- cid,
- currentContactFolderName + '/' + cname);
- }
+ var cname = '' + rows[i].getAttribute("contactname");
+ var email = '' + rows[i].cells[1].innerHTML;
+ opener.window.addContact(tag, currentContactFolderName + '/' + cname,
+ cid, cname, email);
}
return false;
diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js
index ca6468d8d..6fea23b2f 100644
--- a/UI/WebServerResources/MailerUI.js
+++ b/UI/WebServerResources/MailerUI.js
@@ -39,20 +39,25 @@ var cachedMessages = new Array();
var currentMailbox = '';
/* mail list */
-function openMessageWindow(sender, msguid, url) {
+function openMessageWindow(msguid, url) {
log ("message window at url: " + url);
- var msgWin = window.open(url, "SOGo_msg_" + msguid,
- "width=640,height=480,resizable=1,scrollbars=1,toolbar=0," +
- "location=0,directories=0,status=0,menubar=0,copyhistory=0");
+ var wId = '';
+ if (msguid)
+ wId += "SOGo_msg_" + msguid;
+ var msgWin = window.open(url, wId,
+ "width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
+ + "location=0,directories=0,status=0,menubar=0,copyhistory=0");
msgWin.focus();
+
+ return false;
}
function clickedUid(sender, msguid) {
resetSelection(window);
- openMessageWindow(sender, msguid,
- ApplicationBaseURL + currentMailbox + "/" + msguid + "/view");
- return true;
+ return openMessageWindow(msguid,
+ ApplicationBaseURL + currentMailbox + "/"
+ + msguid + "/view");
}
function doubleClickedUid(sender, msguid) {
@@ -73,18 +78,6 @@ function clearSearch(sender) {
return true;
}
-/* compose support */
-
-function clickedCompose(sender) {
- var urlstr;
-
- urlstr = "compose";
- window.open(urlstr, "SOGo_compose",
- "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," +
- "location=0,directories=0,status=0,menubar=0,copyhistory=0");
- return false; /* stop following the link */
-}
-
/* mail editor */
function validateEditorInput(sender) {
@@ -152,7 +145,7 @@ function showInlineAttachmentList(sender) {
function updateInlineAttachmentList(sender, attachments) {
if (!attachments || (attachments.length == 0)) {
- this.hideInlineAttachmentList(sender);
+// this.hideInlineAttachmentList(sender);
return;
}
var e, i, count, text;
@@ -172,34 +165,13 @@ function updateInlineAttachmentList(sender, attachments) {
function openAddressbook(sender) {
var urlstr;
- urlstr = ApplicationBaseURL + "/../Contacts/select";
+ urlstr = ApplicationBaseURL + "/../Contacts/?popup=YES";
var w = window.open(urlstr, "Addressbook",
- "width=640,height=400,left=10,top=10,toolbar=no," +
- "dependent=yes,menubar=no,location=no,resizable=yes," +
- "scrollbars=yes,directories=no,status=no");
+ "width=640,height=400,resizable=1,scrollbars=1,toolbar=0,"
+ + "location=0,directories=0,status=0,menubar=0,copyhistory=0");
w.focus();
-}
-/* filters */
-
-function clickedFilter(sender, scriptname) {
- var urlstr;
-
- urlstr = scriptname + "/edit";
- window.open(urlstr, "SOGo_filter_" + scriptname,
- "width=640,height=480,resizable=1,scrollbars=1,toolbar=0," +
- "location=0,directories=0,status=0,menubar=0,copyhistory=0")
- return true;
-}
-
-function clickedNewFilter(sender) {
- var urlstr;
-
- urlstr = "create";
- window.open(urlstr, "SOGo_filter",
- "width=680,height=480,resizable=1,scrollbars=1,toolbar=0," +
- "location=0,directories=0,status=0,menubar=0,copyhistory=0");
- return false; /* stop following the link */
+ return false;
}
/* mail list DOM changes */
@@ -277,18 +249,19 @@ function reopenToRemoveLocationBar() {
/* mail list reply */
-function openMessageWindowsForSelection(sender, action)
+function openMessageWindowsForSelection(action)
{
var messageList = $("messageList");
var rows = messageList.getSelectedRowsId();
var idset = "";
for (var i = 0; i < rows.length; i++)
- win = openMessageWindow(sender,
- rows[i].substr(4) /* msguid */,
+ win = openMessageWindow(rows[i].substr(4) /* msguid */,
ApplicationBaseURL + currentMailbox
+ "/" + rows[i].substr(4)
+ "/" + action /* url */);
+
+ return false;
}
function mailListMarkMessage(sender, action, msguid, markread)
@@ -726,39 +699,9 @@ function onMenuOpenMessage(event)
var node = getParentMenu(event.target).menuTarget.parentNode;
var msgId = node.getAttribute('id').substr(4);
- openMessageWindow(null, msgId,
- ApplicationBaseURL + currentMailbox
- + "/" + msgId + "/view");
-
- return false;
-}
-
-function onMenuReplyToSender(event)
-{
- openMessageWindowsForSelection(null, 'reply');
-
- return false;
-}
-
-function onMenuReplyToAll(event)
-{
- openMessageWindowsForSelection(null, 'replyall');
-
- return false;
-}
-
-function onMenuForwardMessage(event)
-{
- openMessageWindowsForSelection(null, 'forward');
-
- return false;
-}
-
-function onMenuDeleteMessage(event)
-{
- uixDeleteSelectedMessages(null);
-
- return false;
+ return openMessageWindow(msgId,
+ ApplicationBaseURL + currentMailbox
+ + "/" + msgId + "/view");
}
/* contacts */
diff --git a/UI/WebServerResources/UIxAppointmentEditor.js b/UI/WebServerResources/UIxAppointmentEditor.js
index ea34b80f7..ad4962edb 100644
--- a/UI/WebServerResources/UIxAppointmentEditor.js
+++ b/UI/WebServerResources/UIxAppointmentEditor.js
@@ -19,7 +19,7 @@
02111-1307, USA.
*/
-// var cuicui = '';
+var contactSelectorAction = 'scheduler-contacts';
function uixEarlierDate(date1, date2) {
// can this be done in a sane way?
@@ -155,3 +155,34 @@ function toggleCycleVisibility(node, nodeName, hiddenValue) {
}
}
}
+
+function addContact(tag, fullContactName, contactId, contactName, contactEmail)
+{
+ var uids = $('uixselector-participants-uidList');
+ log ("contactId: " + contactId);
+ if (contactId)
+ {
+ var re = new RegExp("(^|,)" + contactId + "($|,)");
+
+ log ("uids: " + uids);
+ if (!re.test(uids.value))
+ {
+ log ("no match... realling adding");
+ if (uids.value.length > 0)
+ uids.value += ',' + contactId;
+ else
+ uids.value = contactId;
+
+ log ('values: ' + uids.value);
+ var names = $('uixselector-participants-display');
+ names.innerHTML += ('
'
+ + contactName + '');
+ }
+ else
+ log ("match... ignoring contact");
+ }
+
+ return false;
+}