From 6e01d277505982cafa51c1ff1e37df67a6969674 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 19 Oct 2006 19:23:58 +0000 Subject: [PATCH] Monotone-Parent: 194497a44299aa739388b0b0e04ab2b178c81471 Monotone-Revision: 0baf969f5825efbb195eb2aa0eee29ef3b76e1e5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-19T19:23:58 Monotone-Branch: ca.inverse.sogo --- UI/MailerUI/Toolbars/SOGoMailAccount.toolbar | 21 ----- UI/MailerUI/Toolbars/SOGoMailFolder.toolbar | 86 -------------------- UI/MailerUI/Toolbars/SOGoTrashFolder.toolbar | 39 --------- UI/WebServerResources/ContactsUI.js | 13 ++- UI/WebServerResources/generic.js | 19 +++-- 5 files changed, 17 insertions(+), 161 deletions(-) delete mode 100644 UI/MailerUI/Toolbars/SOGoMailAccount.toolbar delete mode 100644 UI/MailerUI/Toolbars/SOGoMailFolder.toolbar delete mode 100644 UI/MailerUI/Toolbars/SOGoTrashFolder.toolbar diff --git a/UI/MailerUI/Toolbars/SOGoMailAccount.toolbar b/UI/MailerUI/Toolbars/SOGoMailAccount.toolbar deleted file mode 100644 index a47c8399c..000000000 --- a/UI/MailerUI/Toolbars/SOGoMailAccount.toolbar +++ /dev/null @@ -1,21 +0,0 @@ -( /* the toolbar groups -*-cperl-*- */ - ( /* first group */ - { link = "getMail"; - image = "tb-mail-getmail-flat-24x24.png"; - cssClass = "tbicon_getmail"; label = "Get Mail"; }, - { - link = "#"; // "compose"; // target = "_blank"; - isSafe = NO; - image = "tb-mail-write-flat-24x24.png"; - onclick = "clickedCompose(this);return false;"; - cssClass = "tbicon_compose"; label = "Write"; - }, - ), - ( // fourth group (folders) - { link = "#"; onclick="return ctxFolderAdd(this)"; - enabled = "showFolderCreateButton"; - isSafe = NO; - image = "tbtb_folderadd.png"; - cssClass = "tbicon_folderadd"; label = "Create"; } - ) -) diff --git a/UI/MailerUI/Toolbars/SOGoMailFolder.toolbar b/UI/MailerUI/Toolbars/SOGoMailFolder.toolbar deleted file mode 100644 index a32403f40..000000000 --- a/UI/MailerUI/Toolbars/SOGoMailFolder.toolbar +++ /dev/null @@ -1,86 +0,0 @@ -( /* the toolbar groups -*-cperl-*- */ - ( /* first group */ - { link = "getMail"; - image = "tb-mail-getmail-flat-24x24.png"; - cssClass = "tbicon_getmail"; label = "Get Mail"; }, - - { link = "#"; // "compose"; // target = "_blank"; - isSafe = NO; - image = "tb-mail-write-flat-24x24.png"; - onclick = "clickedCompose(this);return false;"; - cssClass = "tbicon_compose"; label = "Write"; }, - ), - - - ( // second group - { link = "#"; isSafe = NO; - onclick="openMessageWindowsForSelection(this, 'reply'); return false;"; - image = "tb-mail-reply-flat-24x24.png"; - cssClass = "tbicon_reply"; label = "Reply"; }, - - { link = "#"; isSafe = NO; - onclick="openMessageWindowsForSelection(this, 'replyall'); return false;"; - image = "tb-mail-replyall-flat-24x24.png"; - cssClass = "tbicon_replyall"; label = "Reply All"; }, - - { link = "#"; isSafe = NO; - onclick="openMessageWindowsForSelection(this, 'forward'); return false;"; - image = "tb-mail-forward-flat-24x24.png"; - cssClass = "tbicon_forward"; label = "Forward"; }, - ), - - - ( // third group - /* TODO: maybe this should be a default or get enabled with no trash writes - { link = "expunge"; isSafe = NO; - enabled = clientObject.isDeleteAndExpungeAllowed; - image = "tb-mail-delete-flat-24x24.png"; - cssClass = "tbicon_delete"; label = "Expunge"; }, - */ - - // TODO: rename to uixTrashSelectedMessages, be more consistent with - // SOGoMailObject.toolbar (trash AND delete button) - { link = "#"; isSafe = NO; - onclick = "uixDeleteSelectedMessages(this); return false;"; - enabled = clientObject.isDeleteAndExpungeAllowed; - image = "tb-mail-delete-flat-24x24.png"; - cssClass = "tbicon_delete"; label = "Delete"; - } - , - - /* TODO: enable when implemented - // TODO: enable when we know how to mark junk #971) - { link = "#"; isSafe = NO; - image = "tb-mail-junk-flat-24x24.png"; - cssClass = "tbicon_junk"; label = "Junk"; - } - , - */ - ), - - - ( // fourth group (folders) - { link = "#"; onclick="return ctxFolderAdd(this)"; - enabled = "clientObject.isCreateAllowed"; - isSafe = NO; - image = "tbtb_folderadd.png"; - cssClass = "tbicon_folderadd"; label = "Create"; - } - , - { link = "#"; onclick="return ctxFolderDelete(this)"; - enabled = "clientObject.isCreateAllowed"; // TODO: correct? - isSafe = NO; - image = "tbtb_folderdel.png"; - cssClass = "tbicon_folderdel"; label = "Delete"; }, - ), - - /* - ( // fourth group - //TODO: enable when we can print ( #1207) - // { link = "#"; cssClass = "tbicon_print"; label = "Print"; }, - - { - link = "#"; cssClass = "tbicon_stop"; label = "Stop"; }, - ) - */ -) diff --git a/UI/MailerUI/Toolbars/SOGoTrashFolder.toolbar b/UI/MailerUI/Toolbars/SOGoTrashFolder.toolbar deleted file mode 100644 index ebd5e490e..000000000 --- a/UI/MailerUI/Toolbars/SOGoTrashFolder.toolbar +++ /dev/null @@ -1,39 +0,0 @@ -( /* the toolbar groups -*-cperl-*- */ - ( /* first group */ - { - link = "getMail"; - cssClass = "tbicon_getmail"; label = "Get Mail"; - image = "tb-mail-getmail-flat-24x24.png"; - tooltip = "test coucou blabla"; - }, - { - link = "#"; // "compose"; // target = "_blank"; - isSafe = NO; - image = "tb-mail-write-flat-24x24.png"; - onclick = "clickedCompose(this);return false;"; - cssClass = "tbicon_compose"; label = "Write"; - }, - ), - ( // third group - { link = "emptyTrash"; isSafe = NO; - enabled = clientObject.isDeleteAndExpungeAllowed; - image = "tb-mail-junk-flat-24x24.png"; - cssClass = "tbicon_trash"; label = "Empty Trash"; }, -/* TODO: enable when implemented -// TODO: enable when delete works (#1212) - { link = "#"; isSafe = NO; - image = "tb-mail-delete-flat-24x24.png"; - cssClass = "tbicon_delete"; label = "Delete"; }, -// TODO: enable when we know how to mark junk (#971) - { link = "#"; isSafe = NO; - image = "tb-mail-junk-flat-24x24.png"; - cssClass = "tbicon_junk"; label = "Junk"; }, -*/ - ), - -/* - ( // fourth group - { link = "#"; cssClass = "tbicon_stop"; label = "Stop"; }, - ) -*/ -) diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index a5272ee87..b4b0d96c4 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -291,9 +291,8 @@ function onMenuWriteToContact(event, node) var node = getParentMenu(node).menuTarget.parentNode; var contactId = node.getAttribute('id'); - openContactWindow(null, - ApplicationBaseURL + currentContactFolder - + "/" + contactId + "/write"); + openMailComposeWindow(ApplicationBaseURL + currentContactFolder + + "/" + contactId + "/write"); return false; } @@ -324,11 +323,9 @@ function onToolbarWriteToSelectedContacts(event) var contactsList = $('contactsList'); var rows = contactsList.getSelectedRowsId(); - for (var i = 0; i < rows.length; i++) { - openContactWindow(null, - ApplicationBaseURL + currentContactFolder - + "/" + rows[i] + "/write"); - } + for (var i = 0; i < rows.length; i++) + openMailComposeWindow(ApplicationBaseURL + currentContactFolder + + "/" + rows[i] + "/write"); return false; } diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index cf8f6be58..a8cdb4b08 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -148,17 +148,22 @@ function sanitizeMailTo(dirtyMailTo) { return mailto; } +function openMailComposeWindow(url) { + w = window.open(url, null, + "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + + "location=0,directories=0,status=0,menubar=0" + + ",copyhistory=0"); + w.focus(); + + return w; +} + function openMailTo(senderMailto) { var mailto = sanitizeMailTo(senderMailto); if (mailto.length > 0) - { - w = window.open(ApplicationBaseURL + "/../Mail/compose?mailto=" + mailto, - null, - "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + - "location=0,directories=0,status=0,menubar=0,copyhistory=0"); - w.focus(); - } + openMailComposeWindow(ApplicationBaseURL + + "/../Mail/compose?mailto=" + mailto); return false; /* stop following the link */ }