Monotone-Parent: eafd3c0c3b5dc6879988981674509a8d1ccfc286

Monotone-Revision: b2324fd0b056d26c1f593b22e0516160fd06bd3c

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-08-31T13:49:31
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-08-31 13:49:31 +00:00
parent f591023b2c
commit d4c7a0520a
23 changed files with 152 additions and 51 deletions

View File

@ -1,3 +1,19 @@
2010-08-31 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/WebServerResources/UIxMailEditor.js
(onMenuCheckReturnReceipt): new function.
(getMenus): added entries for initializing the new "Options" menu
as well as the "Priority" menu.
* UI/MailerUI/UIxMailEditor.m (-setReceipt, -receipt): new
accessors for the "receipt" hidden input field, meant to interract
the the "return receipt" entry in the "Options" menu.
(-setReplyTo, -replyTo): removed obsolete methods.
* SoObjects/Mailer/SOGoDraftObject.m (-setHeaders:)
(-mimeHeaderMapWithHeaders:excluding:): added handling for the
"Disposition-Notification-To" header.
2010-08-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Tools/SOGoToolRemoveDoubles.m, UI/MailerUI/UIxMailFormatter.m:

View File

@ -186,7 +186,7 @@ static NSString *userAgent = nil;
{
id headerValue;
unsigned int count;
NSString *messageID, *priority;
NSString *messageID, *priority, *pureSender;
for (count = 0; count < 8; count++)
{
@ -206,7 +206,6 @@ static NSString *userAgent = nil;
}
priority = [newHeaders objectForKey: @"priority"];
if (!priority || [priority isEqualToString: @"NORMAL"])
{
[headers removeObjectForKey: @"X-Priority"];
@ -227,6 +226,15 @@ static NSString *userAgent = nil;
{
[headers setObject: @"5 (Lowest)" forKey: @"X-Priority"];
}
if ([[newHeaders objectForKey: @"receipt"] isEqualToString: @"true"])
{
pureSender = [[newHeaders objectForKey: @"from"] pureEMailAddress];
if (pureSender)
[headers setObject: pureSender forKey: @"Disposition-Notification-To"];
}
else
[headers removeObjectForKey: @"Disposition-Notification-To"];
}
- (NSDictionary *) headers
@ -446,7 +454,6 @@ static NSString *userAgent = nil;
while ((currentAddress = [addresses nextObject]))
if ([currentAddress email])
[_ma addObject: [currentAddress email]];
}
- (void) _addRecipients: (NSArray *) recipients
@ -1328,6 +1335,9 @@ static NSString *userAgent = nil;
if ([(s = [headers objectForKey: @"X-Priority"]) length] > 0)
[map setObject: s
forKey: @"X-Priority"];
if ([(s = [headers objectForKey: @"Disposition-Notification-To"]) length] > 0)
[map setObject: s
forKey: @"Disposition-Notification-To"];
[self _addHeaders: _headers toHeaderMap: map];

View File

@ -18,7 +18,7 @@
"Contacts" = "Contatos";
"Attach" = "Anexo";
"Save" = "Salvar";
"Priority" = "Prioridade";
"Options" = "Options";
"Size" = "Size";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Editar Rascunho...";
"Load Images" = "Carregar Imagens";
"Return Receipt" = "Return Receipt";
"Priority" = "Prioridade";
"highest" = "Muito Alta";
"high" = "Alta";
"normal" = "Normal";

View File

@ -18,7 +18,7 @@
"Contacts" = "Kontakty";
"Attach" = "Přiložit";
"Save" = "Uložit";
"Priority" = "Priorita";
"Options" = "Options";
"Size" = "Velikost";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Upravit koncept...";
"Load Images" = "Nahrát obrázky";
"Return Receipt" = "Return Receipt";
"Priority" = "Priorita";
"highest" = "Nejvyšší";
"high" = "Vysoká";
"normal" = "Normální";

View File

@ -18,7 +18,7 @@
"Contacts" = "Adresboek";
"Attach" = "Bijlage";
"Save" = "Opslaan";
"Priority" = "Prioriteit";
"Options" = "Options";
"Size" = "Size";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Concept aanpassen...";
"Load Images" = "Afbeeldingen laden";
"Return Receipt" = "Ontvangstbevestiging";
"Priority" = "Prioriteit";
"highest" = "Hoogste";
"high" = "Hoog";
"normal" = "Normaal";

View File

@ -18,7 +18,7 @@
"Contacts" = "Contacts";
"Attach" = "Attach";
"Save" = "Save";
"Priority" = "Priority";
"Options" = "Options";
"Size" = "Size";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Edit Draft...";
"Load Images" = "Load Images";
"Return Receipt" = "Return Receipt";
"Priority" = "Priority";
"highest" = "Highest";
"high" = "High";
"normal" = "Normal";

View File

@ -18,7 +18,7 @@
"Contacts" = "Contacts";
"Attach" = "Joindre";
"Save" = "Enregistrer";
"Priority" = "Priorité";
"Options" = "Options";
"Size" = "Taille";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Modifier le brouillon...";
"Load Images" = "Télécharger les images";
"Return Receipt" = "Accusé de réception";
"Priority" = "Priorité";
"highest" = "Maximale";
"high" = "Haute";
"normal" = "Normale";

View File

@ -18,7 +18,7 @@
"Contacts" = "Kontakte";
"Attach" = "Anhang";
"Save" = "Speichern";
"Priority" = "Priorität";
"Options" = "Options";
"Size" = "Größe";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Entwurf bearbeiten...";
"Load Images" = "Bilder laden";
"Return Receipt" = "Empfangsbestätigung";
"Priority" = "Priorität";
"highest" = "Sehr hoch";
"high" = "Hoch";
"normal" = "Normal";

View File

@ -18,7 +18,7 @@
"Contacts" = "Kapcsolatok";
"Attach" = "Melléklet";
"Save" = "Mentés";
"Priority" = "Sürgősség";
"Options" = "Options";
"Size" = "Méret";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Piszkozat szerkesztése...";
"Load Images" = "Képek betöltése";
"Return Receipt" = "Return Receipt";
"Priority" = "Sürgősség";
"highest" = "nagyon sürgős";
"high" = "sürgős";
"normal" = "átlagos";

View File

@ -21,7 +21,7 @@
"Contacts" = "Contatti";
"Attach" = "Allegato";
"Save" = "Salva";
"Priority" = "Priorità";
"Options" = "Options";
"Size" = "Size";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Modifica bozza...";
"Load Images" = "Carica Immagini";
"Return Receipt" = "Return Receipt";
"Priority" = "Priorità";
"highest" = "Molto alta";
"high" = "Alta";
"normal" = "Normale";

View File

@ -18,7 +18,7 @@
"Contacts" = "Kontakty";
"Attach" = "Załącz";
"Save" = "Zapisz";
"Priority" = "Priorytet";
"Options" = "Options";
"Size" = "Rozmiar";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Edytuj szkic...";
"Load Images" = "Załaduj obrazki";
"Return Receipt" = "Return Receipt";
"Priority" = "Priorytet";
"highest" = "Najwyższy";
"high" = "Wysoki";
"normal" = "Normalny";

View File

@ -18,7 +18,7 @@
"Contacts" = "Адресная книга";
"Attach" = "Вложить";
"Save" = "Сохранить";
"Priority" = "Важность";
"Options" = "Options";
"Size" = "Size";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Редактировать черновик...";
"Load Images" = "Загрузить изображения";
"Return Receipt" = "Return Receipt";
"Priority" = "Важность";
"highest" = "Самый высокий";
"high" = "Высокий";
"normal" = "Обычный";

View File

@ -18,7 +18,7 @@
"Contacts" = "Contactos";
"Attach" = "Adjuntar";
"Save" = "Guardar";
"Priority" = "Priority";
"Options" = "Options";
"Size" = "Size";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Modificar borrador...";
"Load Images" = "Load Images";
"Return Receipt" = "Return Receipt";
"Priority" = "Priority";
"highest" = "Highest";
"high" = "High";
"normal" = "Normal";

View File

@ -18,7 +18,7 @@
"Contacts" = "Kontakter";
"Attach" = "Bifoga";
"Save" = "Spara";
"Priority" = "Prioritet";
"Options" = "Options";
"Size" = "Storlek";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Redigera utkast...";
"Load Images" = "Ladda bilder";
"Return Receipt" = "Return Receipt";
"Priority" = "Prioritet";
"highest" = "Högst";
"high" = "Hög";
"normal" = "Normal";

View File

@ -6,7 +6,9 @@
image = "tb-compose-send-flat-24x24.png";
cssClass = "tbicon_send";
label = "Send";
tooltip = "Send this message now"; },
tooltip = "Send this message now"; }
),
(
{ link = "#";
onclick = "return onContactAdd(null);";
image = "tb-compose-contacts-flat-24x24.png";
@ -27,10 +29,11 @@
cssClass = "tbicon_save";
label = "Save";
tooltip = "Save this message"; },
{ link = "#";
{ link = "#";
hasMenu = YES;
label = "Priority";
onclick = "return onSelectPriority(event);";
image = "priority.png"; },
onclick = "return onSelectOptions(event);";
image = "options.png";
cssClass = "tbicon_options";
label = "Options"; }
)
)

View File

@ -78,6 +78,7 @@
SOGoMailFolder *sentFolder;
NSString *priority;
NSString *receipt;
id item;
/* these are for the inline attachment list */
@ -97,8 +98,8 @@ static NSArray *infoKeys = nil;
if (!infoKeys)
infoKeys = [[NSArray alloc] initWithObjects:
@"subject", @"to", @"cc", @"bcc",
@"from", @"replyTo", @"inReplyTo",
@"priority", nil];
@"from", @"inReplyTo",
@"priority", @"receipt", nil];
}
- (id) init
@ -106,6 +107,7 @@ static NSArray *infoKeys = nil;
if ((self = [super init]))
{
priority = @"NORMAL";
receipt = nil;
}
return self;
@ -115,6 +117,7 @@ static NSArray *infoKeys = nil;
{
[item release];
[priority release];
[receipt release];
[sentFolder release];
[fromEMails release];
[from release];
@ -158,7 +161,7 @@ static NSArray *infoKeys = nil;
- (void) setPriority: (NSString *) _priority
{
ASSIGN(priority, _priority);
ASSIGN (priority, _priority);
}
- (NSString *) priority
@ -166,6 +169,16 @@ static NSArray *infoKeys = nil;
return priority;
}
- (void) setReceipt: (NSString *) newReceipt
{
ASSIGN (receipt, newReceipt);
}
- (NSString *) receipt
{
return receipt;
}
- (NSString *) itemPriorityText
{
return [self labelForKey: [NSString stringWithFormat: @"%@", [item lowercaseString]]];
@ -221,16 +234,6 @@ static NSArray *infoKeys = nil;
return from;
}
// - (void) setReplyTo: (NSString *) ignore
// {
// }
// - (NSString *) replyTo
// {
// /* we are here for future extensibility */
// return @"";
// }
- (void) setSubject: (NSString *) newSubject
{
ASSIGN (subject, newSubject);

View File

@ -18,7 +18,7 @@
"Contacts" = "Адреса";
"Attach" = "Вкладення";
"Save" = "Зберегти";
"Priority" = "Важливість";
"Options" = "Options";
"Size" = "Розмір";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Редагувати чернетку...";
"Load Images" = "Завантажити зображення";
"Return Receipt" = "Return Receipt";
"Priority" = "Важливість";
"highest" = "Найвища";
"high" = "Висока";
"normal" = "Звичайна";

View File

@ -18,7 +18,7 @@
"Contacts" = "Cysylltiadau";
"Attach" = "Atodi";
"Save" = "Cadw";
"Priority" = "Blaenoriaeth";
"Options" = "Options";
"Size" = "Size";
/* Tooltips */
@ -109,6 +109,9 @@
"Edit Draft..." = "Golygu Drafft...";
"Load Images" = "Llwytho Delweddau";
"Return Receipt" = "Return Receipt";
"Priority" = "Blaenoriaeth";
"highest" = "Uchaf";
"high" = "Uchel";
"normal" = "Normal";

View File

@ -32,7 +32,15 @@
</ul>
</div>
<div class="menu" id="priority-menu">
<div class="menu" id="optionsMenu">
<ul class="choiceMenu">
<li><var:string label:value="Return Receipt"/></li>
<li><!-- separator --></li>
<li><var:string label:value="Priority"/></li>
</ul>
</div>
<div class="menu" id="priorityMenu">
<ul id="itemPriorityList" class="choiceMenu">
<var:foreach list="priorityClasses" item="item">
<li var:priority="item"><var:string
@ -42,8 +50,8 @@
</div>
<form const:href="" name="pageform" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="priority" id="priority"
var:value="priority"/>
<input type="hidden" name="priority" id="priority" var:value="priority"/>
<input type="hidden" name="receipt" id="receipt" var:value="receipt"/>
<div id="attachmentsArea">
<var:string label:value="Attachments:" />

View File

@ -433,7 +433,7 @@ function focusCKEditor(event) {
function initializePriorityMenu() {
var priority = $("priority").value.toUpperCase();
var priorityMenu = $("priority-menu").childNodesWithTag("ul")[0];
var priorityMenu = $("priorityMenu").childNodesWithTag("ul")[0];
var menuEntries = $(priorityMenu).childNodesWithTag("li");
var chosenNode;
if (priority == "HIGHEST")
@ -448,19 +448,39 @@ function initializePriorityMenu() {
chosenNode = menuEntries[2];
priorityMenu.chosenNode = chosenNode;
$(chosenNode).addClassName("_chosen");
}
var menuItems = $("itemPriorityList").childNodesWithTag("li");
for (var i = 0; i < menuItems.length; i++)
menuItems[i].observe("mousedown",
onMenuSetPriority.bindAsEventListener(menuItems[i]),
false);
function onMenuCheckReturnReceipt() {
event.cancelBubble = true;
this.enabled = !this.enabled;
var enabled = this.enabled;
if (enabled) {
this.addClassName("_chosen");
}
else {
this.removeClassName("_chosen");
}
var receiptInput = $("receipt");
receiptInput.value = (enabled ? "true" : "false") ;
}
function getMenus() {
return { "attachmentsMenu": new Array(null, onRemoveAttachments,
onSelectAllAttachments,
"-",
clickedEditorAttach, null) };
return {
"attachmentsMenu": [ null, onRemoveAttachments,
onSelectAllAttachments,
"-",
clickedEditorAttach, null],
"optionsMenu": [ onMenuCheckReturnReceipt,
"-",
"priorityMenu" ],
"priorityMenu": [ onMenuSetPriority,
onMenuSetPriority,
onMenuSetPriority,
onMenuSetPriority,
onMenuSetPriority ]
};
}
function onRemoveAttachments() {
@ -537,12 +557,12 @@ function onSelectAllAttachments() {
nodes[i].selectElement();
}
function onSelectPriority(event) {
function onSelectOptions(event) {
if (event.button == 0 || (isSafari() && event.button == 1)) {
var node = getTarget(event);
if (node.tagName != 'A')
node = $(node).up("A");
popupToolbarMenu(node, "priority-menu");
popupToolbarMenu(node, "optionsMenu");
Event.stop(event);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

View File

@ -391,7 +391,6 @@ sogo: image-file-in-usr-lib usr/lib/GNUstep/SOGo/WebServerResources/non_sorted.g
sogo: image-file-in-usr-lib usr/lib/GNUstep/SOGo/WebServerResources/offline-settings.png
sogo: image-file-in-usr-lib usr/lib/GNUstep/SOGo/WebServerResources/plus.png
sogo: image-file-in-usr-lib usr/lib/GNUstep/SOGo/WebServerResources/previous.gif
sogo: image-file-in-usr-lib usr/lib/GNUstep/SOGo/WebServerResources/priority.png
sogo: image-file-in-usr-lib usr/lib/GNUstep/SOGo/WebServerResources/properties.png
sogo: embedded-javascript-library usr/lib/GNUstep/SOGo/WebServerResources/prototype.js
sogo: image-file-in-usr-lib usr/lib/GNUstep/SOGo/WebServerResources/quota-level-alert.png