mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-21 06:33:18 +00:00
Monotone-Parent: 8566d6fbfa896a774b9907c3125e7b3de87296cd
Monotone-Revision: 2ad8b0c019808014c990f51cc69c4457fdb537c6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-07-28T22:59:11 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
"Get Mail" = "Relever";
|
||||
"Junk" = "Indésirable";
|
||||
"Reply" = "Répondre";
|
||||
"Reply All" = "Répo. à tous";
|
||||
"Reply All" = "Rép. à tous";
|
||||
"Print" = "Imprimer";
|
||||
"Stop" = "Stop";
|
||||
"Write" = "Écrire";
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
"Home" = "Accueil";
|
||||
"Calendar" = "Agenda";
|
||||
"Addressbook" = "Carnet d'adresses";
|
||||
"Addressbook" = "Adresses";
|
||||
"Mail" = "Mail";
|
||||
"Right Administration" = "Administration";
|
||||
"Help" = "Aide";
|
||||
@@ -54,7 +54,7 @@
|
||||
"all" = "Tous";
|
||||
"read" = "Lus";
|
||||
"unread" = "Non Lus";
|
||||
"deleted" = "Éffacés";
|
||||
"deleted" = "Effacés";
|
||||
"flagged" = "Drapeau";
|
||||
|
||||
/* MailListView */
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
"SentFolderName" = "Éléments envoyés";
|
||||
"TrashFolderName" = "Corbeille";
|
||||
"InboxFolderName" = "Boite de Réception";
|
||||
"InboxFolderName" = "Boite de réception";
|
||||
"DraftsFolderName" = "Brouillons";
|
||||
"SieveFolderName" = "Filtres";
|
||||
"Folders" = "Dossiers";
|
||||
@@ -93,3 +93,50 @@
|
||||
"Add to Address Book..." = "Ajouter au carnet d'adresses";
|
||||
"Compose Mail To" = "Écrire à";
|
||||
"Create Filter From Message..." = "Créer un filtre à partir du message...";
|
||||
|
||||
/* Mailbox popup menus */
|
||||
"Open in New Mail Window" = "Ouvrir dans une nouvelle fenétre";
|
||||
"Copy Folder Location" = "Copier l'adresse du dossier";
|
||||
"Subscribe..." = "S'abonner...";
|
||||
"Mark Folder Read..." = "Marquer le dossier comme lu";
|
||||
"New Folder..." = "Nouveau dossier...";
|
||||
"Compact This Folder" = "Compacter ce dossier";
|
||||
"Search Messages..." = "Rechercher dans les messages...";
|
||||
"Properties..." = "Propriétés";
|
||||
"New Subfolder..." = "Nouveau sous-dossier...";
|
||||
"Rename Folder..." = "Renommer le dossier...";
|
||||
"Delete Folder" = "Supprimer le dossier...";
|
||||
"Get Messages for Account" = "Relever les messages de ce compte";
|
||||
|
||||
/* Message list popup menu */
|
||||
"Open Message In New Window" = "Ouvrir dans une nouvelle fenétre";
|
||||
"Reply to Sender Only" = "Répondre à l'expéditeur";
|
||||
"Reply to All" = "Répondre à tout le monde";
|
||||
"Forward" = "Transférer";
|
||||
"Edit As New..." = "Modifier comme un nouveau message";
|
||||
"Move To" = "Déplacer vers";
|
||||
"Copy To" = "Copier vers";
|
||||
"Label" = "Étiquette";
|
||||
"Mark" = "Marquer";
|
||||
"Save As..." = "Enregistrer comme...";
|
||||
"Print Preview" = "Aperçu avant impression";
|
||||
"Print..." = "Imprimer...";
|
||||
"Delete Message" = "Supprimer le message";
|
||||
|
||||
/* Label popup menu */
|
||||
"None" = "Aucune";
|
||||
"Important" = "Important";
|
||||
"Work" = "Travail";
|
||||
"Personal" = "Personnel";
|
||||
"To Do" = "À faire";
|
||||
"Later" = "Peut attendre";
|
||||
|
||||
/* Mark popup menu */
|
||||
"As Read" = "Comme lu";
|
||||
"Thread As Read" = "La discussion comme lue";
|
||||
"As Read By Date..." = "Comme lus par date...";
|
||||
"All Read" = "Tous les messages comme lus";
|
||||
"Flag" = "Avec un drapeau";
|
||||
"As Junk" = "Comme indésirable";
|
||||
"As Not Junk" = "Comme acceptable";
|
||||
"Run Junk Mail Controls" = "Lancer le contrôle des indésirables";
|
||||
|
||||
@@ -19,11 +19,16 @@ MailerUI_OBJC_FILES += \
|
||||
UIxMailMainFrame.m \
|
||||
UIxMailTree.m \
|
||||
UIxMailTreeBlock.m \
|
||||
UIxMailTreeBlockJS.m \
|
||||
UIxMailFolderMenu.m \
|
||||
\
|
||||
UIxMailAccountsView.m \
|
||||
UIxMailAccountView.m \
|
||||
UIxMailAccountViewContainer.m \
|
||||
UIxMailListView.m \
|
||||
UIxMailListViewContainer.m \
|
||||
UIxMailView.m \
|
||||
UIxMailViewContainer.m \
|
||||
UIxMailSortableTableHeader.m \
|
||||
UIxMailMoveToPopUp.m \
|
||||
UIxMailFilterPanel.m \
|
||||
@@ -40,12 +45,11 @@ MailerUI_OBJC_FILES += \
|
||||
UIxFilterList.m \
|
||||
UIxSieveEditor.m \
|
||||
\
|
||||
UIxMailFolderACLEditor.m \
|
||||
UIxMailFolderACLEditor.m
|
||||
|
||||
MailerUI_RESOURCE_FILES += \
|
||||
Version \
|
||||
product.plist \
|
||||
UIxMailView.js \
|
||||
Toolbars/*.toolbar \
|
||||
Images/*.png
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
cssClass = "tbicon_send"; label = "Send"; },
|
||||
{ link = "#"; target = "addressbook";
|
||||
onclick = "openAddressbook(this);return false;";
|
||||
image = "tb-mail-addressbook-flat-24x24.png";
|
||||
cssClass = "tbicon_addressbook"; label = "Addressbook"; },
|
||||
{ link = "#"; target = "anais";
|
||||
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"; },
|
||||
cssClass = "tbicon_anais"; label = "Anais"; }, */
|
||||
{ link = "#"; isSafe = NO;
|
||||
onclick = "clickedEditorAttach(this)";
|
||||
image = "tb-compose-attach-flat-24x24.png";
|
||||
@@ -20,8 +20,5 @@
|
||||
onclick = "clickedEditorSave(this);return false;";
|
||||
image = "tb-mail-file-flat-24x24.png";
|
||||
cssClass = "tbicon_save"; label = "Save"; },
|
||||
{ link = "delete"; isSafe = NO;
|
||||
image = "tb-mail-delete-flat-24x24.png";
|
||||
cssClass = "tbicon_delete"; label = "Delete"; },
|
||||
)
|
||||
)
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
image = "tb-mail-write-flat-24x24.png";
|
||||
onclick = "clickedCompose(this);return false;";
|
||||
cssClass = "tbicon_compose"; label = "Write"; },
|
||||
{ link = "#"; target = "addressbook";
|
||||
onclick = "openAddressbook(this);return false;";
|
||||
image = "tb-mail-addressbook-flat-24x24.png";
|
||||
cssClass = "tbicon_addressbook"; label = "Addressbook"; },
|
||||
),
|
||||
|
||||
( // second group
|
||||
@@ -30,28 +34,25 @@
|
||||
),
|
||||
|
||||
( // third group
|
||||
{ link = "delete"; isSafe = NO;
|
||||
{ link = "delete";
|
||||
isSafe = NO;
|
||||
enabled = showMarkDeletedButton;
|
||||
image = "tb-mail-delete-flat-24x24.png";
|
||||
cssClass = "tbicon_delete"; label = "Delete"; },
|
||||
|
||||
{ link = "trash"; isSafe = NO;
|
||||
enabled = showTrashButton;
|
||||
image = "tb-mail-delete-flat-24x24.png";
|
||||
cssClass = "tbicon_delete"; label = "Delete"; },
|
||||
|
||||
/* TODO: enable when we know how to mark junk (#971)
|
||||
=> we could move the mail to the Junk folder?!
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
cssClass = "tbicon_junk"; label = "Junk"; },
|
||||
*/
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-junk-flat-24x24.png";
|
||||
cssClass = "tbicon_junk"; label = "Junk";
|
||||
},
|
||||
),
|
||||
/*
|
||||
( // fourth group
|
||||
// TODO: enable when we can print (#1207)
|
||||
// { link = "#"; cssClass = "tbicon_print"; label = "Print"; },
|
||||
{ link = "#"; cssClass = "tbicon_stop"; label = "Stop"; },
|
||||
(
|
||||
{ link = "#";
|
||||
cssClass = "tbicon_print";
|
||||
image = "tb-mail-print-flat-24x24.png";
|
||||
label = "Print"; },
|
||||
{ link = "#";
|
||||
image = "tb-mail-stop-flat-24x24.png";
|
||||
cssClass = "tbicon_stop";
|
||||
label = "Stop"; },
|
||||
),
|
||||
*/
|
||||
)
|
||||
|
||||
@@ -113,6 +113,12 @@ static BOOL useAltNamespace = NO;
|
||||
return [self->inbox isCreateAllowedInACL];
|
||||
}
|
||||
|
||||
- (NSString *) mailFolderName
|
||||
{
|
||||
return [NSString stringWithFormat: @"/%@",
|
||||
[[self clientObject] nameInContainer]];
|
||||
}
|
||||
|
||||
/* error redirects */
|
||||
|
||||
- (id)redirectToViewWithError:(id)_error {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* UIxMailAccountViewContainer.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UIXMAILACCOUNTVIEWCONTAINER_H
|
||||
#define UIXMAILACCOUNTVIEWCONTAINER_H
|
||||
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
@interface UIxMailAccountViewContainer : UIxComponent
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXMAILLISTVIEWCONTAINER_H */
|
||||
@@ -0,0 +1,27 @@
|
||||
/* UIxMailAccountViewContainer.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "UIxMailAccountViewContainer.h"
|
||||
|
||||
@implementation UIxMailAccountViewContainer
|
||||
|
||||
@end
|
||||
@@ -35,4 +35,23 @@
|
||||
return [self labelForKey:@"SOGo Mail Accounts"];
|
||||
}
|
||||
|
||||
- (id) defaultAction
|
||||
{
|
||||
NSArray *c;
|
||||
NSString *inbox;
|
||||
id actionResult;
|
||||
|
||||
c = [[self clientObject] toManyRelationshipKeys];
|
||||
if ([c count] == 1)
|
||||
{
|
||||
inbox = [NSString stringWithFormat: @"%@/INBOX",
|
||||
[c objectAtIndex: 0]];
|
||||
actionResult = [self redirectToLocation: inbox];
|
||||
}
|
||||
else
|
||||
actionResult = self;
|
||||
|
||||
return actionResult;
|
||||
}
|
||||
|
||||
@end /* UIxMailAccountsView */
|
||||
|
||||
@@ -280,17 +280,17 @@ static NSArray *infoKeys = nil;
|
||||
SOGoMailAccounts *accounts;
|
||||
SOGoMailAccount *account;
|
||||
SOGoMailIdentity *identity;
|
||||
|
||||
|
||||
if (useLocationBasedSentFolder) /* from will be based on location */
|
||||
return;
|
||||
|
||||
|
||||
if ([self->from isNotEmpty]) /* a from is already set */
|
||||
return;
|
||||
|
||||
|
||||
accountID = [[[self context] request] formValueForKey:@"account"];
|
||||
if (![accountID isNotEmpty])
|
||||
return;
|
||||
|
||||
|
||||
accounts = [[self clientObject] mailAccountsFolder];
|
||||
if ([accounts isExceptionOrNull])
|
||||
return; /* we don't treat this as an error but are tolerant */
|
||||
@@ -306,7 +306,7 @@ static NSArray *infoKeys = nil;
|
||||
return;
|
||||
}
|
||||
|
||||
[self setFrom:[identity email]];
|
||||
[self setFrom: [identity email]];
|
||||
}
|
||||
|
||||
- (SOGoMailIdentity *)selectedMailIdentity {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#include "common.h"
|
||||
|
||||
#import "../Common/NSString+URL.h"
|
||||
#import "../SOGoUI/NSString+URL.h"
|
||||
|
||||
@implementation UIxMailEditorAction
|
||||
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
{
|
||||
NSString *searchText;
|
||||
NSString *searchCriteria;
|
||||
struct {
|
||||
int hideFrame:1;
|
||||
int reserved:31;
|
||||
} mfFlags;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -79,8 +75,6 @@ static NSDictionary *filterToQualifier = nil;
|
||||
{
|
||||
searchText = nil;
|
||||
searchCriteria = nil;
|
||||
mfFlags.hideFrame = 0;
|
||||
mfFlags.reserved = 0;
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -94,16 +88,6 @@ static NSDictionary *filterToQualifier = nil;
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setHideFrame:(BOOL)_flag
|
||||
{
|
||||
self->mfFlags.hideFrame = _flag ? 1 : 0;
|
||||
}
|
||||
|
||||
- (BOOL)hideFrame
|
||||
{
|
||||
return self->mfFlags.hideFrame ? YES : NO;
|
||||
}
|
||||
|
||||
- (void)setSearchText: (NSString *)_txt
|
||||
{
|
||||
ASSIGNCOPY(self->searchText, _txt);
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with OGo; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UIXMAILLISTVIEW_H
|
||||
#define UIXMAILLISTVIEW_H
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
|
||||
@class EOQualifier;
|
||||
|
||||
@interface UIxMailListView : UIxComponent
|
||||
{
|
||||
NSArray *sortedUIDs; /* we always need to retrieve all anyway! */
|
||||
NSArray *messages;
|
||||
unsigned firstMessageNumber;
|
||||
id message;
|
||||
EOQualifier *qualifier;
|
||||
}
|
||||
|
||||
- (NSString *)defaultSortKey;
|
||||
- (NSString *)imap4SortKey;
|
||||
- (NSString *)imap4SortOrdering;
|
||||
|
||||
- (BOOL)isSortedDescending;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXMAILLISTVIEW_H */
|
||||
+150
-101
@@ -19,8 +19,6 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
|
||||
/*
|
||||
UIxMailListView
|
||||
|
||||
@@ -28,35 +26,20 @@
|
||||
object.
|
||||
*/
|
||||
|
||||
@class EOQualifier;
|
||||
|
||||
@interface UIxMailListView : UIxComponent
|
||||
{
|
||||
NSArray *sortedUIDs; /* we always need to retrieve all anyway! */
|
||||
NSArray *messages;
|
||||
unsigned firstMessageNumber;
|
||||
id message;
|
||||
EOQualifier *qualifier;
|
||||
}
|
||||
|
||||
- (NSString *)defaultSortKey;
|
||||
- (NSString *)imap4SortKey;
|
||||
- (NSString *)imap4SortOrdering;
|
||||
|
||||
- (BOOL)isSortedDescending;
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
#include <SoObjects/Mailer/SOGoMailFolder.h>
|
||||
#include <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#include <NGObjWeb/SoObject+SoDAV.h>
|
||||
|
||||
@implementation UIxMailListView
|
||||
#import "UIxMailListView.h"
|
||||
|
||||
static int attachmentFlagSize = 8096;
|
||||
|
||||
- (void)dealloc {
|
||||
@implementation UIxMailListView
|
||||
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[self->qualifier release];
|
||||
[self->sortedUIDs release];
|
||||
[self->messages release];
|
||||
@@ -64,15 +47,10 @@ static int attachmentFlagSize = 8096;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* frame */
|
||||
|
||||
- (BOOL)hideFrame {
|
||||
return [[[[self context] request] formValueForKey:@"noframe"] boolValue];
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void)sleep {
|
||||
- (void) sleep
|
||||
{
|
||||
[self->qualifier release]; self->qualifier = nil;
|
||||
[self->sortedUIDs release]; self->sortedUIDs = nil;
|
||||
[self->messages release]; self->messages = nil;
|
||||
@@ -82,21 +60,28 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setMessage:(id)_msg {
|
||||
- (void)setMessage:(id)_msg
|
||||
{
|
||||
ASSIGN(self->message, _msg);
|
||||
}
|
||||
- (id)message {
|
||||
|
||||
- (id) message
|
||||
{
|
||||
return self->message;
|
||||
}
|
||||
|
||||
- (void)setQualifier:(EOQualifier *)_msg {
|
||||
- (void) setQualifier: (EOQualifier *) _msg
|
||||
{
|
||||
ASSIGN(self->qualifier, _msg);
|
||||
}
|
||||
- (EOQualifier *)qualifier {
|
||||
|
||||
- (EOQualifier *) qualifier
|
||||
{
|
||||
return self->qualifier;
|
||||
}
|
||||
|
||||
- (BOOL)showToAddress {
|
||||
- (BOOL) showToAddress
|
||||
{
|
||||
NSString *ftype;
|
||||
|
||||
ftype = [[self clientObject] valueForKey:@"outlookFolderClass"];
|
||||
@@ -105,10 +90,13 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* title */
|
||||
|
||||
- (NSString *)objectTitle {
|
||||
- (NSString *) objectTitle
|
||||
{
|
||||
return [[self clientObject] nameInContainer];
|
||||
}
|
||||
- (NSString *)panelTitle {
|
||||
|
||||
- (NSString *) panelTitle
|
||||
{
|
||||
NSString *s;
|
||||
|
||||
s = [self labelForKey:@"View Mail Folder"];
|
||||
@@ -119,24 +107,35 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* derived accessors */
|
||||
|
||||
- (BOOL)isMessageDeleted {
|
||||
- (BOOL) isMessageDeleted
|
||||
{
|
||||
NSArray *flags;
|
||||
|
||||
flags = [[self message] valueForKey:@"flags"];
|
||||
return [flags containsObject:@"deleted"];
|
||||
}
|
||||
|
||||
- (BOOL)isMessageRead {
|
||||
- (BOOL) isMessageRead
|
||||
{
|
||||
NSArray *flags;
|
||||
|
||||
flags = [[self message] valueForKey:@"flags"];
|
||||
return [flags containsObject:@"seen"];
|
||||
}
|
||||
- (NSString *)messageUidString {
|
||||
- (NSString *) messageUidString
|
||||
{
|
||||
return [[[self message] valueForKey:@"uid"] stringValue];
|
||||
}
|
||||
|
||||
- (NSString *)messageSubjectCellStyleClass {
|
||||
- (NSString *) messageCellStyleClass
|
||||
{
|
||||
return [self isMessageDeleted]
|
||||
? @"mailer_listcell_deleted"
|
||||
: @"mailer_listcell_regular";
|
||||
}
|
||||
|
||||
- (NSString *) messageSubjectCellStyleClass
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@ %@",
|
||||
[self messageCellStyleClass],
|
||||
([self isMessageRead]
|
||||
@@ -144,13 +143,8 @@ static int attachmentFlagSize = 8096;
|
||||
: @"mailer_unreadmailsubject")];
|
||||
}
|
||||
|
||||
- (NSString *)messageCellStyleClass {
|
||||
return [self isMessageDeleted]
|
||||
? @"mailer_listcell_deleted"
|
||||
: @"mailer_listcell_regular";
|
||||
}
|
||||
|
||||
- (BOOL)hasMessageAttachment {
|
||||
- (BOOL) hasMessageAttachment
|
||||
{
|
||||
/* we detect attachments by size ... */
|
||||
unsigned size;
|
||||
|
||||
@@ -160,7 +154,8 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* fetching messages */
|
||||
|
||||
- (NSArray *)fetchKeys {
|
||||
- (NSArray *) fetchKeys
|
||||
{
|
||||
/* Note: see SOGoMailManager.m for allowed IMAP4 keys */
|
||||
static NSArray *keys = nil;
|
||||
if (keys == nil) {
|
||||
@@ -170,10 +165,12 @@ static int attachmentFlagSize = 8096;
|
||||
return keys;
|
||||
}
|
||||
|
||||
- (NSString *)defaultSortKey {
|
||||
- (NSString *) defaultSortKey
|
||||
{
|
||||
return @"DATE";
|
||||
}
|
||||
- (NSString *)imap4SortKey {
|
||||
- (NSString *) imap4SortKey
|
||||
{
|
||||
NSString *sort;
|
||||
|
||||
sort = [[[self context] request] formValueForKey:@"sort"];
|
||||
@@ -183,7 +180,8 @@ static int attachmentFlagSize = 8096;
|
||||
return [sort uppercaseString];
|
||||
}
|
||||
|
||||
- (BOOL)isSortedDescending {
|
||||
- (BOOL) isSortedDescending
|
||||
{
|
||||
NSString *desc;
|
||||
|
||||
desc = [[[self context] request] formValueForKey:@"desc"];
|
||||
@@ -192,7 +190,8 @@ static int attachmentFlagSize = 8096;
|
||||
return [desc boolValue] ? YES : NO;
|
||||
}
|
||||
|
||||
- (NSString *)imap4SortOrdering {
|
||||
- (NSString *) imap4SortOrdering
|
||||
{
|
||||
NSString *sort;
|
||||
|
||||
sort = [self imap4SortKey];
|
||||
@@ -201,13 +200,15 @@ static int attachmentFlagSize = 8096;
|
||||
return [@"REVERSE " stringByAppendingString:sort];
|
||||
}
|
||||
|
||||
- (NSRange)fetchRange {
|
||||
- (NSRange) fetchRange
|
||||
{
|
||||
if (self->firstMessageNumber == 0)
|
||||
return NSMakeRange(0, 50);
|
||||
return NSMakeRange(self->firstMessageNumber - 1, 50);
|
||||
}
|
||||
|
||||
- (NSArray *)sortedUIDs {
|
||||
- (NSArray *) sortedUIDs
|
||||
{
|
||||
if (self->sortedUIDs != nil)
|
||||
return self->sortedUIDs;
|
||||
|
||||
@@ -216,14 +217,19 @@ static int attachmentFlagSize = 8096;
|
||||
sortOrdering:[self imap4SortOrdering]] retain];
|
||||
return self->sortedUIDs;
|
||||
}
|
||||
- (unsigned int)totalMessageCount {
|
||||
|
||||
- (unsigned int) totalMessageCount
|
||||
{
|
||||
return [self->sortedUIDs count];
|
||||
}
|
||||
- (BOOL)showsAllMessages {
|
||||
|
||||
- (BOOL) showsAllMessages
|
||||
{
|
||||
return ([[self sortedUIDs] count] <= [self fetchRange].length) ? YES : NO;
|
||||
}
|
||||
|
||||
- (NSRange)fetchBlock {
|
||||
- (NSRange) fetchBlock
|
||||
{
|
||||
NSRange r;
|
||||
unsigned len;
|
||||
NSArray *uids;
|
||||
@@ -249,27 +255,33 @@ static int attachmentFlagSize = 8096;
|
||||
r.length = len - r.location;
|
||||
return r;
|
||||
}
|
||||
- (unsigned int)firstMessageNumber {
|
||||
- (unsigned int) firstMessageNumber
|
||||
{
|
||||
return [self fetchBlock].location + 1;
|
||||
}
|
||||
- (unsigned int)lastMessageNumber {
|
||||
- (unsigned int) lastMessageNumber
|
||||
{
|
||||
NSRange r;
|
||||
|
||||
r = [self fetchBlock];
|
||||
return r.location + r.length;
|
||||
}
|
||||
- (BOOL)hasPrevious {
|
||||
- (BOOL) hasPrevious
|
||||
{
|
||||
return [self fetchBlock].location == 0 ? NO : YES;
|
||||
}
|
||||
- (BOOL)hasNext {
|
||||
- (BOOL) hasNext
|
||||
{
|
||||
NSRange r = [self fetchBlock];
|
||||
return r.location + r.length >= [[self sortedUIDs] count] ? NO : YES;
|
||||
}
|
||||
|
||||
- (unsigned int)nextFirstMessageNumber {
|
||||
- (unsigned int) nextFirstMessageNumber
|
||||
{
|
||||
return [self firstMessageNumber] + [self fetchRange].length;
|
||||
}
|
||||
- (unsigned int)prevFirstMessageNumber {
|
||||
- (unsigned int) prevFirstMessageNumber
|
||||
{
|
||||
NSRange r;
|
||||
unsigned idx;
|
||||
|
||||
@@ -280,7 +292,8 @@ static int attachmentFlagSize = 8096;
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSArray *)messages {
|
||||
- (NSArray *) messages
|
||||
{
|
||||
NSArray *uids;
|
||||
NSArray *msgs;
|
||||
NSRange r;
|
||||
@@ -302,10 +315,14 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* URL processing */
|
||||
|
||||
- (NSString *)messageViewTarget {
|
||||
return [@"SOGo_msg_" stringByAppendingString:[self messageUidString]];
|
||||
- (NSString *) messageViewTarget
|
||||
{
|
||||
return [NSString stringWithFormat: @"SOGo_msg_%@",
|
||||
[self messageUidString]];
|
||||
}
|
||||
- (NSString *)messageViewURL {
|
||||
|
||||
- (NSString *) messageViewURL
|
||||
{
|
||||
// TODO: noframe only when view-target is empty
|
||||
// TODO: markread only if the message is unread
|
||||
NSString *s;
|
||||
@@ -314,11 +331,13 @@ static int attachmentFlagSize = 8096;
|
||||
if (![self isMessageRead]) s = [s stringByAppendingString:@"&markread=1"];
|
||||
return s;
|
||||
}
|
||||
- (NSString *)markReadURL {
|
||||
- (NSString *) markReadURL
|
||||
{
|
||||
return [@"markMessageRead?uid=" stringByAppendingString:
|
||||
[self messageUidString]];
|
||||
}
|
||||
- (NSString *)markUnreadURL {
|
||||
- (NSString *) markUnreadURL
|
||||
{
|
||||
return [@"markMessageUnread?uid=" stringByAppendingString:
|
||||
[self messageUidString]];
|
||||
}
|
||||
@@ -345,35 +364,41 @@ static int attachmentFlagSize = 8096;
|
||||
return [@"unreaddiv_" stringByAppendingString:[self messageUidString]];
|
||||
}
|
||||
|
||||
- (NSString *)clickedMsgJS {
|
||||
- (NSString *) clickedMsgJS
|
||||
{
|
||||
/* return 'false' aborts processing */
|
||||
return [NSString stringWithFormat:@"clickedUid(this, '%@'); return false",
|
||||
[self messageUidString]];
|
||||
}
|
||||
|
||||
// the following are unused?
|
||||
- (NSString *)dblClickedMsgJS {
|
||||
- (NSString *) dblClickedMsgJS
|
||||
{
|
||||
return [NSString stringWithFormat:@"doubleClickedUid(this, '%@')",
|
||||
[self messageUidString]];
|
||||
}
|
||||
|
||||
// the following are unused?
|
||||
- (NSString *)highlightRowJS {
|
||||
- (NSString *) highlightRowJS
|
||||
{
|
||||
return [NSString stringWithFormat:@"highlightUid(this, '%@')",
|
||||
[self messageUidString]];
|
||||
}
|
||||
- (NSString *)lowlightRowJS {
|
||||
- (NSString *) lowlightRowJS
|
||||
{
|
||||
return [NSString stringWithFormat:@"lowlightUid(this, '%@')",
|
||||
[self messageUidString]];
|
||||
}
|
||||
|
||||
- (NSString *)markUnreadJS {
|
||||
- (NSString *) markUnreadJS
|
||||
{
|
||||
return [NSString stringWithFormat:
|
||||
@"mailListMarkMessage(this, 'markMessageUnread', "
|
||||
@"'%@', false)",
|
||||
[self messageUidString]];
|
||||
}
|
||||
- (NSString *)markReadJS {
|
||||
- (NSString *) markReadJS
|
||||
{
|
||||
return [NSString stringWithFormat:
|
||||
@"mailListMarkMessage(this, 'markMessageRead', "
|
||||
@"'%@', true)",
|
||||
@@ -382,7 +407,8 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* error redirects */
|
||||
|
||||
- (id)redirectToViewWithError:(id)_error {
|
||||
- (id) redirectToViewWithError: (id) _error
|
||||
{
|
||||
// TODO: DUP in UIxMailAccountView
|
||||
// TODO: improve, localize
|
||||
// TODO: there is a bug in the treeview which preserves the current URL for
|
||||
@@ -404,7 +430,8 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* active message */
|
||||
|
||||
- (SOGoMailObject *)lookupActiveMessage {
|
||||
- (SOGoMailObject *) lookupActiveMessage
|
||||
{
|
||||
NSString *uid;
|
||||
|
||||
if ((uid = [[[self context] request] formValueForKey:@"uid"]) == nil)
|
||||
@@ -416,16 +443,13 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* actions */
|
||||
|
||||
- (id)defaultAction {
|
||||
self->firstMessageNumber =
|
||||
[[[[self context] request] formValueForKey:@"idx"] intValue];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)isJavaScriptRequest {
|
||||
- (BOOL) isJavaScriptRequest
|
||||
{
|
||||
return [[[[self context] request] formValueForKey:@"jsonly"] boolValue];
|
||||
}
|
||||
- (id)javaScriptOK {
|
||||
|
||||
- (id) javaScriptOK
|
||||
{
|
||||
WOResponse *r;
|
||||
|
||||
r = [[self context] response];
|
||||
@@ -433,7 +457,21 @@ static int attachmentFlagSize = 8096;
|
||||
return r;
|
||||
}
|
||||
|
||||
- (id)markMessageUnreadAction {
|
||||
- (id) defaultAction
|
||||
{
|
||||
self->firstMessageNumber =
|
||||
[[[[self context] request] formValueForKey:@"idx"] intValue];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) viewAction
|
||||
{
|
||||
return [self defaultAction];
|
||||
}
|
||||
|
||||
- (id) markMessageUnreadAction
|
||||
{
|
||||
NSException *error;
|
||||
|
||||
if ((error = [[self lookupActiveMessage] removeFlags:@"seen"]) != nil)
|
||||
@@ -445,7 +483,9 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
- (id)markMessageReadAction {
|
||||
|
||||
- (id) markMessageReadAction
|
||||
{
|
||||
NSException *error;
|
||||
|
||||
if ((error = [[self lookupActiveMessage] addFlags:@"seen"]) != nil)
|
||||
@@ -458,7 +498,8 @@ static int attachmentFlagSize = 8096;
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
|
||||
- (id)getMailAction {
|
||||
- (id) getMailAction
|
||||
{
|
||||
// TODO: we might want to flush the caches?
|
||||
id client;
|
||||
|
||||
@@ -466,18 +507,21 @@ static int attachmentFlagSize = 8096;
|
||||
return [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"did not find mail folder"];
|
||||
}
|
||||
|
||||
if (![client respondsToSelector:@selector(flushMailCaches)]) {
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:
|
||||
@"invalid client object (does not support flush)"];
|
||||
}
|
||||
|
||||
|
||||
if (![client respondsToSelector:@selector(flushMailCaches) ])
|
||||
{
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:
|
||||
@"invalid client object (does not support flush)"];
|
||||
}
|
||||
|
||||
[client flushMailCaches];
|
||||
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
|
||||
- (id)expungeAction {
|
||||
- (id) expungeAction
|
||||
{
|
||||
// TODO: we might want to flush the caches?
|
||||
NSException *error;
|
||||
id client;
|
||||
@@ -495,7 +539,8 @@ static int attachmentFlagSize = 8096;
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
|
||||
- (id)emptyTrashAction {
|
||||
- (id) emptyTrashAction
|
||||
{
|
||||
// TODO: we might want to flush the caches?
|
||||
NSException *error;
|
||||
id client;
|
||||
@@ -536,7 +581,8 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
/* folder operations */
|
||||
|
||||
- (id)createFolderAction {
|
||||
- (id) createFolderAction
|
||||
{
|
||||
NSException *error;
|
||||
NSString *folderName;
|
||||
id client;
|
||||
@@ -562,7 +608,8 @@ static int attachmentFlagSize = 8096;
|
||||
return [self redirectToLocation:[folderName stringByAppendingString:@"/"]];
|
||||
}
|
||||
|
||||
- (id)deleteFolderAction {
|
||||
- (id) deleteFolderAction
|
||||
{
|
||||
NSException *error;
|
||||
NSString *url;
|
||||
id client;
|
||||
@@ -583,4 +630,6 @@ static int attachmentFlagSize = 8096;
|
||||
return [self redirectToLocation:url];
|
||||
}
|
||||
|
||||
@end /* UIxMailListView */
|
||||
@end
|
||||
|
||||
/* UIxMailListView */
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* UIxMailListViewContainer.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UIXMAILLISTVIEWCONTAINER_H
|
||||
#define UIXMAILLISTVIEWCONTAINER_H
|
||||
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
@interface UIxMailListViewContainer : UIxComponent
|
||||
|
||||
- (NSString *) mailFolderName;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXMAILLISTVIEWCONTAINER_H */
|
||||
@@ -0,0 +1,51 @@
|
||||
/* UIxMailListViewContainer.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <NGObjWeb/SoObjects.h>
|
||||
|
||||
#import <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#import <SoObjects/Mailer/SOGoMailAccounts.h>
|
||||
#import "UIxMailListViewContainer.h"
|
||||
|
||||
@implementation UIxMailListViewContainer
|
||||
|
||||
- (NSString *) mailFolderName
|
||||
{
|
||||
NSMutableArray *mailboxes;
|
||||
SOGoMailObject *currentObject;
|
||||
|
||||
mailboxes = [NSMutableArray new];
|
||||
[mailboxes autorelease];
|
||||
|
||||
currentObject = [self clientObject];
|
||||
while (![currentObject isKindOfClass: [SOGoMailAccounts class]])
|
||||
{
|
||||
[mailboxes insertObject: [currentObject nameInContainer] atIndex: 0];
|
||||
currentObject = [currentObject container];
|
||||
}
|
||||
|
||||
return [NSString stringWithFormat: @"/%@",
|
||||
[mailboxes componentsJoinedByString: @"/"]];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,44 @@
|
||||
/* UIxMailMainFrame.h - this file is part of $PROJECT_NAME_HERE$
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UIXMAILMAINFRAME_H
|
||||
#define UIXMAILMAINFRAME_H
|
||||
|
||||
#import "../Common/UIxPageFrame.h"
|
||||
|
||||
@interface UIxMailMainFrame : UIxPageFrame
|
||||
{
|
||||
NSString *rootURL;
|
||||
NSString *userRootURL;
|
||||
struct {
|
||||
int hideFolderTree:1;
|
||||
int reserved:31;
|
||||
} mmfFlags;
|
||||
}
|
||||
|
||||
- (NSString *)rootURL;
|
||||
- (NSString *)userRootURL;
|
||||
- (NSString *)calendarRootURL;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXMAILMAINFRAME_H */
|
||||
@@ -19,31 +19,11 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
#include "../Common/UIxPageFrame.h"
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
#import "UIxMailMainFrame.h"
|
||||
|
||||
@interface UIxMailMainFrame : UIxPageFrame
|
||||
{
|
||||
NSString *rootURL;
|
||||
NSString *userRootURL;
|
||||
struct {
|
||||
int hideFolderTree:1;
|
||||
int hideFrame:1; /* completely disables all the frame around the comp. */
|
||||
int reserved:30;
|
||||
} mmfFlags;
|
||||
}
|
||||
|
||||
- (NSString *)rootURL;
|
||||
- (NSString *)userRootURL;
|
||||
- (NSString *)calendarRootURL;
|
||||
|
||||
@end
|
||||
|
||||
@interface UIxMailPanelFrame : UIxMailMainFrame
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
#include <NGObjWeb/SoComponent.h>
|
||||
#import "common.h"
|
||||
#import <NGObjWeb/SoComponent.h>
|
||||
|
||||
@implementation UIxMailMainFrame
|
||||
|
||||
@@ -78,14 +58,7 @@ static NSString *treeRootClassName = nil;
|
||||
return self->mmfFlags.hideFolderTree ? YES : NO;
|
||||
}
|
||||
|
||||
- (void)setHideFrame:(BOOL)_flag {
|
||||
self->mmfFlags.hideFrame = _flag ? 1 : 0;
|
||||
}
|
||||
- (BOOL)hideFrame {
|
||||
return self->mmfFlags.hideFrame ? YES : NO;
|
||||
}
|
||||
|
||||
- (NSString *)pageFormURL {
|
||||
- (NSString *) pageFormURL {
|
||||
NSString *u;
|
||||
NSRange r;
|
||||
|
||||
@@ -179,6 +152,7 @@ static NSString *treeRootClassName = nil;
|
||||
- (NSString *)calendarRootURL {
|
||||
return [[self userRootURL] stringByAppendingString:@"Calendar/"];
|
||||
}
|
||||
|
||||
- (NSString *)contactsRootURL {
|
||||
return [[self userRootURL] stringByAppendingString:@"Contacts/"];
|
||||
}
|
||||
@@ -210,14 +184,3 @@ static NSString *treeRootClassName = nil;
|
||||
}
|
||||
|
||||
@end /* UIxMailMainFrame */
|
||||
|
||||
@implementation UIxMailPanelFrame
|
||||
|
||||
- (BOOL)hideFolderTree {
|
||||
return YES;
|
||||
}
|
||||
- (BOOL)showLinkBanner {
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end /* UIxMailPanelFrame */
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
- (void)setSortKey:(NSString *)_sortKey {
|
||||
ASSIGNCOPY(self->sortKey, _sortKey);
|
||||
}
|
||||
|
||||
- (NSString *)sortKey {
|
||||
return self->sortKey;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* UIxMailTree.h - this file is part of $PROJECT_NAME_HERE$
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UIXMAILTREE_H
|
||||
#define UIXMAILTREE_H
|
||||
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
@class NSString;
|
||||
|
||||
@interface UIxMailTree : UIxComponent
|
||||
{
|
||||
NSString *rootClassName;
|
||||
NSString *treeFolderAction;
|
||||
NSMutableDictionary *flattenedNodes;
|
||||
id rootNodes;
|
||||
id item;
|
||||
}
|
||||
|
||||
- (NSArray *) flattenedNodes;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXMAILTREE_H */
|
||||
+232
-92
@@ -19,23 +19,16 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
#import "common.h"
|
||||
|
||||
@interface UIxMailTree : UIxComponent
|
||||
{
|
||||
NSString *rootClassName;
|
||||
NSString *treeFolderAction;
|
||||
id rootNodes;
|
||||
id item;
|
||||
}
|
||||
@end
|
||||
#import <SoObjects/Mailer/SOGoMailBaseObject.h>
|
||||
#import <SoObjects/Mailer/SOGoMailAccount.h>
|
||||
#import <SoObjects/Mailer/SOGoMailFolder.h>
|
||||
#import <NGObjWeb/SoComponent.h>
|
||||
#import <NGObjWeb/SoObject+SoDAV.h>
|
||||
|
||||
#include "UIxMailTreeBlock.h"
|
||||
#include <SoObjects/Mailer/SOGoMailBaseObject.h>
|
||||
#include <SoObjects/Mailer/SOGoMailAccount.h>
|
||||
#include "common.h"
|
||||
#include <NGObjWeb/SoComponent.h>
|
||||
#include <NGObjWeb/SoObject+SoDAV.h>
|
||||
#import "UIxMailTree.h"
|
||||
#import "UIxMailTreeBlock.h"
|
||||
|
||||
/*
|
||||
Support special icons:
|
||||
@@ -58,21 +51,34 @@
|
||||
|
||||
static BOOL debugBlocks = NO;
|
||||
|
||||
+ (void)initialize {
|
||||
+ (void)initialize
|
||||
{
|
||||
[UIxMailTreeBlock class]; // ensure that globals are initialized
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
flattenedNodes = [NSMutableDictionary new];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[self->treeFolderAction release];
|
||||
[self->rootClassName release];
|
||||
[self->rootNodes release];
|
||||
[self->item release];
|
||||
[flattenedNodes release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* icons */
|
||||
|
||||
- (NSString *)defaultIconName {
|
||||
- (NSString *) defaultIconName
|
||||
{
|
||||
return @"tbtv_leaf_corner_17x17.gif";
|
||||
}
|
||||
|
||||
@@ -133,7 +139,7 @@ static BOOL debugBlocks = NO;
|
||||
[self logWithFormat:@"to-many: %@ %@", _object,
|
||||
[names componentsJoinedByString:@","]];
|
||||
}
|
||||
|
||||
|
||||
count = [names count];
|
||||
ma = [NSMutableArray arrayWithCapacity:(count + 1)];
|
||||
for (i = 0; i < count; i++) {
|
||||
@@ -180,40 +186,48 @@ static BOOL debugBlocks = NO;
|
||||
return [_object isKindOfClass:NSClassFromString([self rootClassName])];
|
||||
}
|
||||
|
||||
- (NSString *)treeNavigationLinkForObject:(id)_object atDepth:(int)_depth {
|
||||
NSString *link;
|
||||
unsigned i;
|
||||
|
||||
link = [[_object nameInContainer] stringByAppendingString:@"/"];
|
||||
link = [link stringByAppendingString:[self treeFolderAction]];
|
||||
|
||||
switch (_depth) {
|
||||
case 0: return link;
|
||||
case 1: return [@"../" stringByAppendingString:link];
|
||||
case 2: return [@"../../" stringByAppendingString:link];
|
||||
case 3: return [@"../../../" stringByAppendingString:link];
|
||||
}
|
||||
- (NSString *)treeNavigationLinkForObject:(id)_object
|
||||
atDepth:(int)_depth
|
||||
{
|
||||
NSMutableString *link;
|
||||
int i;
|
||||
|
||||
link = [NSMutableString new];
|
||||
[link autorelease];
|
||||
|
||||
for (i = 0; i < _depth; i++)
|
||||
link = [@"../" stringByAppendingString:link];
|
||||
[link appendString: @"../"];
|
||||
|
||||
[link appendFormat: @"%@/%@",
|
||||
[_object nameInContainer],
|
||||
[self treeFolderAction]];
|
||||
|
||||
return link;
|
||||
}
|
||||
|
||||
- (void)getTitle:(NSString **)_t andIcon:(NSString **)_icon
|
||||
forObject:(id)_object
|
||||
- (void) getTitle: (NSString **)_t
|
||||
folderType: (NSString **)_ft
|
||||
andIcon: (NSString **)_icon
|
||||
forObject: (id)_object
|
||||
{
|
||||
// TODO: need to refactor for reuse!
|
||||
NSString *ftype;
|
||||
unsigned len;
|
||||
|
||||
// if ([_object respondsToSelector: @selector (outlookFolderClass)])
|
||||
// ftype = [_object outlookFolderClass];
|
||||
// else
|
||||
ftype = [_object valueForKey:@"outlookFolderClass"];
|
||||
len = [ftype length];
|
||||
|
||||
ftype = [_object valueForKey:@"outlookFolderClass"];
|
||||
len = [ftype length];
|
||||
|
||||
*_ft = nil;
|
||||
|
||||
switch (len) {
|
||||
case 8:
|
||||
if ([ftype isEqualToString:@"IPF.Sent"]) {
|
||||
*_t = [self labelForKey:@"SentFolderName"];
|
||||
*_icon = @"tbtv_sent_17x17.gif";
|
||||
*_ft = @"sent";
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -221,11 +235,13 @@ static BOOL debugBlocks = NO;
|
||||
if ([ftype isEqualToString:@"IPF.Inbox"]) {
|
||||
*_t = [self labelForKey:@"InboxFolderName"];
|
||||
*_icon = @"tbtv_inbox_17x17.gif";
|
||||
*_ft = @"inbox";
|
||||
return;
|
||||
}
|
||||
if ([ftype isEqualToString:@"IPF.Trash"]) {
|
||||
*_t = [self labelForKey:@"TrashFolderName"];
|
||||
*_icon = @"tbtv_trash_17x17.gif";
|
||||
*_ft = @"trash";
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -233,11 +249,13 @@ static BOOL debugBlocks = NO;
|
||||
if ([ftype isEqualToString:@"IPF.Drafts"]) {
|
||||
*_t = [self labelForKey:@"DraftsFolderName"];
|
||||
*_icon = @"tbtv_drafts_17x17.gif";
|
||||
*_ft = @"drafts";
|
||||
return;
|
||||
}
|
||||
if ([ftype isEqualToString:@"IPF.Filter"]) {
|
||||
*_t = [self labelForKey:@"SieveFolderName"];
|
||||
*_icon = nil;
|
||||
*_ft = @"sieve";
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -249,32 +267,30 @@ static BOOL debugBlocks = NO;
|
||||
if ([_object isKindOfClass:NSClassFromString(@"SOGoMailFolder")])
|
||||
*_icon = nil;
|
||||
else if ([_object isKindOfClass:NSClassFromString(@"SOGoMailAccount")]) {
|
||||
*_icon = @"tbtv_inbox_17x17.gif";
|
||||
*_icon = @"tbtv_account_17x17.gif";
|
||||
|
||||
*_ft = @"account";
|
||||
|
||||
/* title processing is somehow Agenor specific and should be done in UI */
|
||||
*_t = [[_object nameInContainer] titleForSOGoIMAP4String];
|
||||
}
|
||||
else if ([_object isKindOfClass:NSClassFromString(@"SOGoMailAccounts")])
|
||||
*_icon = @"tbtv_inbox_17x17.gif";
|
||||
*_icon = @"tbtv_account_17x17.gif";
|
||||
else if ([_object isKindOfClass:NSClassFromString(@"SOGoUserFolder")])
|
||||
*_icon = @"tbtv_inbox_17x17.gif";
|
||||
else {
|
||||
// TODO: use drafts icon for other SOGo folders
|
||||
*_icon = @"tbtv_drafts_17x17.gif";
|
||||
}
|
||||
|
||||
NSLog (@"title: '%@', ftype: '%@', class: '%@', icon: '%@'",
|
||||
*_t,
|
||||
ftype, NSStringFromClass([_object class]), *_icon);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
- (UIxMailTreeBlock *)treeNavigationBlockForLeafNode:(id)_o atDepth:(int)_d {
|
||||
- (UIxMailTreeBlock *) treeNavigationBlockForLeafNode: (id) _o
|
||||
atDepth: (int) _d
|
||||
{
|
||||
UIxMailTreeBlock *md;
|
||||
NSString *n, *i;
|
||||
NSString *n, *i, *ft;
|
||||
id blocks;
|
||||
|
||||
|
||||
/*
|
||||
Trigger plus in treeview if it has subfolders. It is an optimization that
|
||||
we do not generate blocks for folders which are not displayed anyway.
|
||||
@@ -282,14 +298,16 @@ static BOOL debugBlocks = NO;
|
||||
blocks = [[_o toManyRelationshipKeys] count] > 0
|
||||
? UIxMailTreeHasChildrenMarker
|
||||
: nil;
|
||||
|
||||
[self getTitle:&n andIcon:&i forObject:_o];
|
||||
|
||||
md = [UIxMailTreeBlock blockWithName:nil
|
||||
title:n iconName:i
|
||||
link:[self treeNavigationLinkForObject:_o atDepth:_d]
|
||||
isPathNode:NO isActiveNode:NO
|
||||
childBlocks:blocks];
|
||||
[self getTitle: &n folderType: &ft andIcon: &i forObject:_o];
|
||||
|
||||
md = [UIxMailTreeBlock blockWithName: nil
|
||||
title: n
|
||||
iconName: i
|
||||
link: [self treeNavigationLinkForObject:_o atDepth:_d]
|
||||
isPathNode:NO
|
||||
isActiveNode:NO
|
||||
childBlocks: blocks];
|
||||
return md;
|
||||
}
|
||||
|
||||
@@ -301,7 +319,7 @@ static BOOL debugBlocks = NO;
|
||||
UIxMailTreeBlock *md;
|
||||
NSMutableArray *blocks;
|
||||
NSArray *folders;
|
||||
NSString *title, *icon;
|
||||
NSString *title, *icon, *ft;
|
||||
unsigned i, count;
|
||||
|
||||
if (debugBlocks) {
|
||||
@@ -317,7 +335,7 @@ static BOOL debugBlocks = NO;
|
||||
for (i = 0; i < count; i++) {
|
||||
id block;
|
||||
|
||||
block = [self treeNavigationBlockForLeafNode:[folders objectAtIndex:i]
|
||||
block = [self treeNavigationBlockForLeafNode: [folders objectAtIndex:i]
|
||||
atDepth:0];
|
||||
if ([block isNotNull]) [blocks addObject:block];
|
||||
}
|
||||
@@ -326,18 +344,63 @@ static BOOL debugBlocks = NO;
|
||||
|
||||
/* build block */
|
||||
|
||||
[self getTitle:&title andIcon:&icon forObject:_object];
|
||||
[self getTitle:&title folderType: &ft andIcon:&icon forObject:_object];
|
||||
|
||||
md = [UIxMailTreeBlock blockWithName:[_object nameInContainer]
|
||||
title:title iconName:icon
|
||||
link:[@"../" stringByAppendingString:
|
||||
[_object nameInContainer]]
|
||||
isPathNode:YES isActiveNode:YES
|
||||
childBlocks:blocks];
|
||||
md = [UIxMailTreeBlock blockWithName: [_object nameInContainer]
|
||||
title: title
|
||||
iconName: icon
|
||||
link: [@"../" stringByAppendingString:
|
||||
[_object nameInContainer]]
|
||||
isPathNode: YES
|
||||
isActiveNode: YES
|
||||
childBlocks: blocks];
|
||||
return md;
|
||||
}
|
||||
|
||||
- (UIxMailTreeBlock *)treeNavigationBlockForActiveNode:(id)_object {
|
||||
- (UIxMailTreeBlock *) fullTreeNavigationBlockForNode: (id)_object
|
||||
{
|
||||
UIxMailTreeBlock *md;
|
||||
NSMutableArray *blocks;
|
||||
NSArray *folders;
|
||||
NSString *title, *icon, *ft;
|
||||
unsigned i, count;
|
||||
|
||||
if (debugBlocks)
|
||||
[self logWithFormat:@"block for root node 0x%08X<%@>",
|
||||
_object, NSStringFromClass([_object class])];
|
||||
|
||||
folders = [self fetchSubfoldersOfObject: _object];
|
||||
count = [folders count];
|
||||
blocks = [NSMutableArray arrayWithCapacity: count];
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id block;
|
||||
|
||||
block = [self fullTreeNavigationBlockForNode: [folders objectAtIndex:i]];
|
||||
if ([block isNotNull]) [blocks addObject:block];
|
||||
}
|
||||
|
||||
if (![blocks count])
|
||||
blocks = nil;
|
||||
|
||||
[self getTitle: &title folderType: &ft andIcon: &icon forObject: _object];
|
||||
// NSLog (@"*********** title = '%@'/icon = '%@'", title, icon);
|
||||
|
||||
md = [UIxMailTreeBlock blockWithName: [_object nameInContainer]
|
||||
title: title
|
||||
iconName: icon
|
||||
link: [@"../" stringByAppendingString:
|
||||
[_object nameInContainer]]
|
||||
isPathNode: YES
|
||||
isActiveNode: YES
|
||||
childBlocks: blocks];
|
||||
[md setFolderType: ft];
|
||||
|
||||
return md;
|
||||
}
|
||||
|
||||
- (UIxMailTreeBlock *) treeNavigationBlockForActiveNode: (id) _object
|
||||
{
|
||||
/*
|
||||
This generates the block for the clientObject (the object which has the
|
||||
focus)
|
||||
@@ -345,7 +408,7 @@ static BOOL debugBlocks = NO;
|
||||
UIxMailTreeBlock *md;
|
||||
NSMutableArray *blocks;
|
||||
NSArray *folders;
|
||||
NSString *title, *icon;
|
||||
NSString *title, *icon, *ft;
|
||||
unsigned i, count;
|
||||
|
||||
// TODO: maybe we can join the two implementations, this might not be
|
||||
@@ -367,26 +430,29 @@ static BOOL debugBlocks = NO;
|
||||
for (i = 0; i < count; i++) {
|
||||
UIxMailTreeBlock *block;
|
||||
|
||||
block = [self treeNavigationBlockForLeafNode:[folders objectAtIndex:i]
|
||||
atDepth:0];
|
||||
block = [self treeNavigationBlockForLeafNode: [folders objectAtIndex:i]
|
||||
atDepth: 0];
|
||||
if ([block isNotNull]) [blocks addObject:block];
|
||||
}
|
||||
if ([blocks count] == 0) blocks = nil;
|
||||
|
||||
|
||||
/* build block */
|
||||
|
||||
[self getTitle:&title andIcon:&icon forObject:_object];
|
||||
md = [UIxMailTreeBlock blockWithName:[_object nameInContainer]
|
||||
title:title iconName:icon
|
||||
link:@"."
|
||||
isPathNode:YES isActiveNode:YES
|
||||
childBlocks:blocks];
|
||||
[self getTitle:&title folderType: &ft andIcon:&icon forObject:_object];
|
||||
md = [UIxMailTreeBlock blockWithName: [_object nameInContainer]
|
||||
title: title
|
||||
iconName: icon
|
||||
link: @"."
|
||||
isPathNode: YES
|
||||
isActiveNode: YES
|
||||
childBlocks: blocks];
|
||||
return md;
|
||||
}
|
||||
|
||||
- (UIxMailTreeBlock *)treeNavigationBlockForObject:(id)_object
|
||||
withActiveChildBlock:(UIxMailTreeBlock *)_activeChildBlock
|
||||
depth:(int)_depth
|
||||
- (UIxMailTreeBlock *)
|
||||
treeNavigationBlockForObject: (id) _object
|
||||
withActiveChildBlock: (UIxMailTreeBlock *) _activeChildBlock
|
||||
depth: (int) _depth
|
||||
{
|
||||
/*
|
||||
Note: 'activeChildBlock' here doesn't mean that the block is the selected
|
||||
@@ -397,7 +463,7 @@ static BOOL debugBlocks = NO;
|
||||
NSMutableArray *blocks;
|
||||
NSString *activeName;
|
||||
NSArray *folders;
|
||||
NSString *title, *icon;
|
||||
NSString *title, *icon, *ft;
|
||||
unsigned i, count;
|
||||
|
||||
activeName = [_activeChildBlock valueForKey:@"name"];
|
||||
@@ -411,11 +477,11 @@ static BOOL debugBlocks = NO;
|
||||
UIxMailTreeBlock *block;
|
||||
id folder;
|
||||
|
||||
NSLog(@"activeName: %@", activeName);
|
||||
folder = [folders objectAtIndex:i];
|
||||
block = [activeName isEqualToString:[folder nameInContainer]]
|
||||
? _activeChildBlock
|
||||
: [self treeNavigationBlockForLeafNode:folder atDepth:_depth];
|
||||
: [self treeNavigationBlockForLeafNode: folder
|
||||
atDepth:_depth];
|
||||
|
||||
if ([block isNotNull]) [blocks addObject:block];
|
||||
}
|
||||
@@ -425,17 +491,19 @@ static BOOL debugBlocks = NO;
|
||||
else
|
||||
blocks = nil;
|
||||
}
|
||||
|
||||
|
||||
/* build block */
|
||||
|
||||
[self getTitle:&title andIcon:&icon forObject:_object];
|
||||
resultBlock = [UIxMailTreeBlock blockWithName:[_object nameInContainer]
|
||||
title:title iconName:icon
|
||||
link:
|
||||
[self treeNavigationLinkForObject:_object
|
||||
atDepth:(_depth + 1)]
|
||||
isPathNode:YES isActiveNode:NO
|
||||
childBlocks:blocks];
|
||||
[self getTitle:&title folderType: &ft andIcon:&icon forObject:_object];
|
||||
resultBlock
|
||||
= [UIxMailTreeBlock blockWithName: [_object nameInContainer]
|
||||
title: title
|
||||
iconName: icon
|
||||
link:
|
||||
[self treeNavigationLinkForObject: _object
|
||||
atDepth: (_depth + 1)]
|
||||
isPathNode:YES isActiveNode:NO
|
||||
childBlocks:blocks];
|
||||
|
||||
/* recurse up unless we are at the root */
|
||||
|
||||
@@ -478,7 +546,7 @@ static BOOL debugBlocks = NO;
|
||||
if (debugBlocks) [self logWithFormat:@"ACTIVE parent block ..."];
|
||||
block = [self treeNavigationBlockForObject:[_object container]
|
||||
withActiveChildBlock:block
|
||||
depth:1];
|
||||
depth: 1];
|
||||
if (debugBlocks) [self logWithFormat:@"done: %@", block];
|
||||
return block;
|
||||
}
|
||||
@@ -501,6 +569,78 @@ static BOOL debugBlocks = NO;
|
||||
return self->rootNodes;
|
||||
}
|
||||
|
||||
- (int) addNodes: (NSArray *) nodes
|
||||
atSerial: (int) startSerial
|
||||
forParent: (int) parent
|
||||
withRootName: (NSString *) rootName
|
||||
toArray: (NSMutableArray *) array
|
||||
{
|
||||
unsigned int count, max, currentSerial;
|
||||
UIxMailTreeBlock *curNode;
|
||||
NSArray *children;
|
||||
NSString *fullName;
|
||||
|
||||
max = [nodes count];
|
||||
currentSerial = startSerial;
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
curNode = [nodes objectAtIndex: count];
|
||||
fullName = [rootName stringByAppendingFormat: @"/%@", [curNode name]];
|
||||
[curNode setName: fullName];
|
||||
[curNode setSerial: currentSerial];
|
||||
[curNode setParent: parent];
|
||||
[array addObject: curNode];
|
||||
if ([curNode hasChildren])
|
||||
currentSerial = [self addNodes: [curNode children]
|
||||
atSerial: currentSerial + 1
|
||||
forParent: currentSerial
|
||||
withRootName: fullName
|
||||
toArray: array];
|
||||
else
|
||||
currentSerial++;
|
||||
}
|
||||
|
||||
return currentSerial;
|
||||
}
|
||||
|
||||
- (NSArray *) flattenedNodes
|
||||
{
|
||||
NSMutableArray *flattenedBlocks = nil;
|
||||
NSString *userKey;
|
||||
UIxMailTreeBlock *rootNode; // , *curNode;
|
||||
id mailAccounts;
|
||||
// unsigned int count, max;
|
||||
|
||||
userKey = [[self user] login];
|
||||
flattenedBlocks = [flattenedNodes objectForKey: userKey];
|
||||
if (!flattenedBlocks)
|
||||
{
|
||||
flattenedBlocks = [NSMutableArray new];
|
||||
|
||||
if (![[self clientObject] isKindOfClass: NSClassFromString(@"SOGoMailAccounts")])
|
||||
mailAccounts = [[self clientObject] mailAccountsFolder];
|
||||
else
|
||||
mailAccounts = [self clientObject];
|
||||
|
||||
rootNode = [self fullTreeNavigationBlockForNode: mailAccounts];
|
||||
[self addNodes: [rootNode children]
|
||||
atSerial: 1
|
||||
forParent: 0
|
||||
withRootName: @""
|
||||
toArray: flattenedBlocks];
|
||||
|
||||
[flattenedNodes setObject: flattenedBlocks forKey: userKey];
|
||||
// max = [flattenedBlocks count];
|
||||
// for (count = 0; count < max; count++)
|
||||
// {
|
||||
// curNode = [flattenedBlocks objectAtIndex: count];
|
||||
// NSLog (@"%d: %@/%@", count, [curNode title], [curNode iconName]);
|
||||
// }
|
||||
}
|
||||
|
||||
return flattenedBlocks;
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void)sleep {
|
||||
|
||||
@@ -41,6 +41,9 @@ extern id UIxMailTreeHasChildrenMarker;
|
||||
NSString *link;
|
||||
NSArray *blocks;
|
||||
NSString *iconName;
|
||||
NSString *folderType;
|
||||
int serial;
|
||||
int parent;
|
||||
struct {
|
||||
int isPath:1;
|
||||
int isActive:1;
|
||||
@@ -48,19 +51,48 @@ extern id UIxMailTreeHasChildrenMarker;
|
||||
} flags;
|
||||
}
|
||||
|
||||
+ (id)blockWithName:(NSString *)_n title:(NSString *)_t iconName:(NSString *)_i
|
||||
link:(NSString *)_link isPathNode:(BOOL)_isPath isActiveNode:(BOOL)_isActive
|
||||
childBlocks:(NSArray *)_blocks;
|
||||
+ (id) blockWithName: (NSString *)_n
|
||||
title: (NSString *)_t
|
||||
iconName: (NSString *)_i
|
||||
link: (NSString *)_link
|
||||
isPathNode: (BOOL)_isPath
|
||||
isActiveNode: (BOOL)_isActive
|
||||
childBlocks: (NSArray *)_blocks;
|
||||
|
||||
- (id)initWithName:(NSString *)_n title:(NSString *)_t iconName:(NSString *)_i
|
||||
link:(NSString *)_link isPathNode:(BOOL)_isPath isActiveNode:(BOOL)_isActive
|
||||
childBlocks:(NSArray *)_blocks;
|
||||
- (id)initWithName: (NSString *)_n
|
||||
title: (NSString *)_t
|
||||
iconName: (NSString *)_i
|
||||
link: (NSString *)_link
|
||||
isPathNode: (BOOL)_isPath
|
||||
isActiveNode: (BOOL)_isActive
|
||||
childBlocks: (NSArray *)_blocks;
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (BOOL)hasChildren;
|
||||
- (BOOL)areChildrenLoaded;
|
||||
- (NSArray *)children;
|
||||
- (BOOL) hasChildren;
|
||||
- (BOOL) areChildrenLoaded;
|
||||
- (NSArray *) children;
|
||||
|
||||
- (void) setName: (NSString *) newName;
|
||||
- (NSString *) name;
|
||||
|
||||
- (void) setSerial: (int) newSerial;
|
||||
- (int) serial;
|
||||
|
||||
- (void) setParent: (int) newParent;
|
||||
- (int) parent;
|
||||
|
||||
- (void) setFolderType: (NSString *) newFolderType;
|
||||
- (NSString *) folderType;
|
||||
|
||||
- (NSString *) serialAsString;
|
||||
- (NSString *) parentAsString;
|
||||
|
||||
- (NSString *) title;
|
||||
- (NSString *) link;
|
||||
- (NSString *) iconName;
|
||||
|
||||
- (NSString *) folderMenuId;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
+115
-34
@@ -19,53 +19,65 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "UIxMailTreeBlock.h"
|
||||
#include "common.h"
|
||||
#import "UIxMailTreeBlock.h"
|
||||
#import "common.h"
|
||||
|
||||
@implementation UIxMailTreeBlock
|
||||
|
||||
id UIxMailTreeHasChildrenMarker = nil;
|
||||
|
||||
+ (void)initialize {
|
||||
+ (void) initialize
|
||||
{
|
||||
// TODO: needs to be an array because the WETreeView requires a
|
||||
// children array
|
||||
UIxMailTreeHasChildrenMarker =
|
||||
[[NSArray alloc] initWithObjects:@"FAKE", nil];
|
||||
}
|
||||
|
||||
+ (id)blockWithName:(NSString *)_name title:(NSString *)_title
|
||||
iconName:(NSString *)_icon
|
||||
link:(NSString *)_link isPathNode:(BOOL)_isPath isActiveNode:(BOOL)_isActive
|
||||
childBlocks:(NSArray *)_blocks
|
||||
+ (id) blockWithName: (NSString *) _name
|
||||
title: (NSString *) _title
|
||||
iconName: (NSString *) _icon
|
||||
link: (NSString *) _link
|
||||
isPathNode: (BOOL) _isPath
|
||||
isActiveNode: (BOOL) _isActive
|
||||
childBlocks: (NSArray *) _blocks
|
||||
{
|
||||
UIxMailTreeBlock *block;
|
||||
|
||||
block = [[self alloc] initWithName:_name title:_title iconName:_icon
|
||||
block = [[self alloc] initWithName:_name
|
||||
title:_title
|
||||
iconName:_icon
|
||||
link:_link
|
||||
isPathNode:_isPath isActiveNode:_isActive
|
||||
isPathNode:_isPath
|
||||
isActiveNode:_isActive
|
||||
childBlocks:_blocks];
|
||||
return [block autorelease];
|
||||
}
|
||||
|
||||
- (id)initWithName:(NSString *)_name title:(NSString *)_title
|
||||
iconName:(NSString *)_icon
|
||||
link:(NSString *)_link isPathNode:(BOOL)_isPath isActiveNode:(BOOL)_isActive
|
||||
childBlocks:(NSArray *)_blocks
|
||||
- (id) initWithName: (NSString *) _name
|
||||
title: (NSString *) _title
|
||||
iconName: (NSString *) _icon
|
||||
link: (NSString *) _link
|
||||
isPathNode: (BOOL) _isPath
|
||||
isActiveNode: (BOOL) _isActive
|
||||
childBlocks: (NSArray *) _blocks
|
||||
{
|
||||
if ((self = [self init])) {
|
||||
self->name = [_name copy];
|
||||
self->title = [_title copy];
|
||||
self->iconName = [_icon copy];
|
||||
self->link = [_link copy];
|
||||
self->blocks = [_blocks retain];
|
||||
if ((self = [self init]))
|
||||
{
|
||||
self->name = [_name copy];
|
||||
self->title = [_title copy];
|
||||
self->iconName = [_icon copy];
|
||||
self->link = [_link copy];
|
||||
self->blocks = [_blocks retain];
|
||||
|
||||
self->flags.isPath = _isPath ? 1 : 0;
|
||||
self->flags.isActive = _isActive ? 1 : 0;
|
||||
}
|
||||
self->flags.isPath = _isPath ? 1 : 0;
|
||||
self->flags.isActive = _isActive ? 1 : 0;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
- (void) dealloc
|
||||
{
|
||||
[self->iconName release];
|
||||
[self->blocks release];
|
||||
[self->name release];
|
||||
@@ -76,30 +88,49 @@ id UIxMailTreeHasChildrenMarker = nil;
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (NSString *)name {
|
||||
- (NSString *) name
|
||||
{
|
||||
return self->name;
|
||||
}
|
||||
- (NSString *)title {
|
||||
|
||||
- (void) setName: (NSString *) newName
|
||||
{
|
||||
if (name)
|
||||
[name release];
|
||||
name = [newName copy];
|
||||
if (name)
|
||||
[name retain];
|
||||
}
|
||||
|
||||
- (NSString *) title
|
||||
{
|
||||
return self->title;
|
||||
}
|
||||
- (NSString *)link {
|
||||
|
||||
- (NSString *) link
|
||||
{
|
||||
return self->link;
|
||||
}
|
||||
- (NSString *)iconName {
|
||||
|
||||
- (NSString *) iconName
|
||||
{
|
||||
return self->iconName;
|
||||
}
|
||||
|
||||
- (BOOL)hasChildren {
|
||||
- (BOOL) hasChildren
|
||||
{
|
||||
if (self->blocks == UIxMailTreeHasChildrenMarker)
|
||||
return YES;
|
||||
return [self->blocks count] > 0 ? YES : NO;
|
||||
}
|
||||
|
||||
- (BOOL)areChildrenLoaded {
|
||||
- (BOOL) areChildrenLoaded
|
||||
{
|
||||
return self->blocks != UIxMailTreeHasChildrenMarker ? YES : NO;
|
||||
}
|
||||
|
||||
- (NSArray *)children {
|
||||
- (NSArray *) children
|
||||
{
|
||||
if (self->blocks == UIxMailTreeHasChildrenMarker)
|
||||
// TODO: print a warning
|
||||
return self->blocks;
|
||||
@@ -107,16 +138,20 @@ id UIxMailTreeHasChildrenMarker = nil;
|
||||
return self->blocks;
|
||||
}
|
||||
|
||||
- (BOOL)isPathNode {
|
||||
- (BOOL) isPathNode
|
||||
{
|
||||
return self->flags.isPath ? YES : NO;
|
||||
}
|
||||
- (BOOL)isActiveNode {
|
||||
|
||||
- (BOOL) isActiveNode
|
||||
{
|
||||
return self->flags.isActive ? YES : NO;
|
||||
}
|
||||
|
||||
/* description */
|
||||
|
||||
- (void)appendAttributesToDescription:(NSMutableString *)_ms {
|
||||
- (void) appendAttributesToDescription: (NSMutableString *) _ms
|
||||
{
|
||||
if (self->name != nil) [_ms appendFormat:@" name='%@'", self->name];
|
||||
if (self->title != nil) [_ms appendFormat:@" title='%@'", self->title];
|
||||
|
||||
@@ -129,7 +164,8 @@ id UIxMailTreeHasChildrenMarker = nil;
|
||||
[_ms appendFormat:@" children=%@", self->blocks];
|
||||
}
|
||||
|
||||
- (NSString *)description {
|
||||
- (NSString *) description
|
||||
{
|
||||
NSMutableString *ms;
|
||||
|
||||
ms = [NSMutableString stringWithCapacity:64];
|
||||
@@ -139,4 +175,49 @@ id UIxMailTreeHasChildrenMarker = nil;
|
||||
return ms;
|
||||
}
|
||||
|
||||
- (void) setSerial: (int) newSerial
|
||||
{
|
||||
serial = newSerial;
|
||||
}
|
||||
|
||||
- (int) serial
|
||||
{
|
||||
return serial;
|
||||
}
|
||||
|
||||
- (NSString *) serialAsString
|
||||
{
|
||||
return [NSString stringWithFormat: @"%d", serial];
|
||||
}
|
||||
|
||||
- (void) setParent: (int) newParent
|
||||
{
|
||||
parent = newParent;
|
||||
}
|
||||
|
||||
- (int) parent
|
||||
{
|
||||
return parent;
|
||||
}
|
||||
|
||||
- (void) setFolderType: (NSString *) newFolderType
|
||||
{
|
||||
folderType = newFolderType;
|
||||
}
|
||||
|
||||
- (NSString *) folderType
|
||||
{
|
||||
return folderType;
|
||||
}
|
||||
|
||||
- (NSString *) parentAsString
|
||||
{
|
||||
return [NSString stringWithFormat: @"%d", parent];
|
||||
}
|
||||
|
||||
- (NSString *) folderMenuId
|
||||
{
|
||||
return [NSString stringWithFormat: @"__wox_submenu_%d-%d", parent, serial];
|
||||
}
|
||||
|
||||
@end /* UIxMailTreeBlock */
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/* UIxMailTreeBlockJS.h - this file is part of $PROJECT_NAME_HERE$
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UIXMAILTREEBLOCKJS_H
|
||||
#define UIXMAILTREEBLOCKJS_H
|
||||
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
#import "common.h"
|
||||
|
||||
@class NSString;
|
||||
@class UIxMailTreeBlock;
|
||||
|
||||
@interface UIxMailTreeBlockJS : UIxComponent
|
||||
{
|
||||
UIxMailTreeBlock *item;
|
||||
NSString *treeObjectName;
|
||||
}
|
||||
|
||||
- (void) setItem: (UIxMailTreeBlock *) newItem;
|
||||
- (UIxMailTreeBlock *) item;
|
||||
|
||||
- (NSString *) iconName;
|
||||
|
||||
- (void) setTreeObjectName: (NSString *) newName;
|
||||
- (NSString *) treeObjectName;
|
||||
|
||||
- (BOOL) isAccount;
|
||||
- (BOOL) isInbox;
|
||||
- (BOOL) isTrash;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXMAILTREEBLOCKJS_H */
|
||||
@@ -0,0 +1,113 @@
|
||||
/* UIxMailTreeBlockJS.m - this file is part of $PROJECT_NAME_HERE$
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "UIxMailTreeBlockJS.h"
|
||||
|
||||
#import "Common/UIxPageFrame.h"
|
||||
|
||||
@implementation UIxMailTreeBlockJS
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
item = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) setItem: (UIxMailTreeBlock *) newItem
|
||||
{
|
||||
item = newItem;
|
||||
}
|
||||
|
||||
- (UIxMailTreeBlock *) item
|
||||
{
|
||||
return item;
|
||||
}
|
||||
|
||||
- (WOResourceManager *) resourceManager
|
||||
{
|
||||
WOResourceManager *resourceManager;
|
||||
id c;
|
||||
|
||||
resourceManager = nil;
|
||||
|
||||
c = self;
|
||||
while (!resourceManager
|
||||
&& c)
|
||||
if ([c respondsToSelector: @selector(pageResourceManager)])
|
||||
resourceManager = [c pageResourceManager];
|
||||
else
|
||||
c = [c parent];
|
||||
|
||||
return resourceManager;
|
||||
}
|
||||
|
||||
- (NSString *) iconName
|
||||
{
|
||||
WOResourceManager *resourceManager;
|
||||
NSString *iconName, *rsrcIconName;
|
||||
|
||||
iconName = [item iconName];
|
||||
if ([iconName length] > 0)
|
||||
{
|
||||
resourceManager = [self resourceManager];
|
||||
rsrcIconName = [resourceManager urlForResourceNamed: iconName
|
||||
inFramework: nil
|
||||
languages: nil
|
||||
request: [[self context] request]];
|
||||
}
|
||||
else
|
||||
rsrcIconName = nil;
|
||||
|
||||
return rsrcIconName;
|
||||
}
|
||||
|
||||
- (void) setTreeObjectName: (NSString *) newName
|
||||
{
|
||||
treeObjectName = newName;
|
||||
}
|
||||
|
||||
- (NSString *) treeObjectName
|
||||
{
|
||||
return treeObjectName;
|
||||
}
|
||||
|
||||
- (BOOL) isAccount
|
||||
{
|
||||
return ([item parent] == 0);
|
||||
}
|
||||
|
||||
- (BOOL) isInbox
|
||||
{
|
||||
return ([[item name] isEqualToString: @"INBOX"]);
|
||||
}
|
||||
|
||||
- (BOOL) isTrash
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,35 +0,0 @@
|
||||
/* contacts */
|
||||
function newContactFromEmail(sender) {
|
||||
var emailre
|
||||
= /([a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])/g;
|
||||
|
||||
emailre.exec(menuClickNode.innerHTML);
|
||||
email = RegExp.$1;
|
||||
|
||||
if (email.length > 0)
|
||||
{
|
||||
emailre.exec("");
|
||||
w = window.open("../../../../Contacts/new?contactEmail=" + email,
|
||||
"SOGo_new_contact",
|
||||
"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 newEmailTo(sender) {
|
||||
var mailto = sanitizeMailTo(menuClickNode.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 */
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/* UIxMailViewContainer.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UIXMAILVIEWCONTAINER_H
|
||||
#define UIXMAILVIEWCONTAINER_H
|
||||
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
@interface UIxMailViewContainer : UIxComponent
|
||||
@end
|
||||
|
||||
#endif /* UIXMAILVIEWCONTAINER_H */
|
||||
@@ -0,0 +1,27 @@
|
||||
/* UIxMailViewContainer.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse groupe conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "UIxMailViewContainer.h"
|
||||
|
||||
@implementation UIxMailViewContainer
|
||||
|
||||
@end
|
||||
+62
-65
@@ -12,7 +12,7 @@
|
||||
"UIxMailToSelection.js",
|
||||
|
||||
"lori_32x32.png",
|
||||
|
||||
|
||||
"tbtv_account_17x17.gif",
|
||||
"tbtv_drafts_17x17.gif",
|
||||
"tbtv_inbox_17x17.gif",
|
||||
@@ -27,7 +27,7 @@
|
||||
"tbtv_corner_plus_17x17.gif",
|
||||
"tbtv_sent_17x17.gif",
|
||||
"tbtv_trash_17x17.gif",
|
||||
|
||||
|
||||
"tbtb_addressbook.png",
|
||||
"tbtb_compose.png",
|
||||
"tbtb_delete.png",
|
||||
@@ -81,52 +81,55 @@
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailFolder.toolbar";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
ajax = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAjaxRequest";
|
||||
};
|
||||
index = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
GET = { /* hack to make it work as the default method */
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
|
||||
markMessageUnread = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "markMessageUnread";
|
||||
};
|
||||
markMessageRead = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "markMessageRead";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "getMail";
|
||||
};
|
||||
expunge = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "expunge";
|
||||
};
|
||||
|
||||
|
||||
createFolder = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "createFolder";
|
||||
};
|
||||
deleteFolder = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "deleteFolder";
|
||||
};
|
||||
|
||||
@@ -134,10 +137,10 @@
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailFolderACLEditor";
|
||||
};
|
||||
|
||||
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailEditorAction";
|
||||
actionClass = "UIxMailEditorAction";
|
||||
actionName = "compose";
|
||||
};
|
||||
};
|
||||
@@ -148,13 +151,13 @@
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoTrashFolder.toolbar";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
emptyTrash = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "emptyTrash";
|
||||
};
|
||||
};
|
||||
@@ -168,103 +171,97 @@
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
pageName = "UIxMailViewContainer";
|
||||
};
|
||||
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
pageName = "UIxMailViewContainer";
|
||||
actionName = "getMail";
|
||||
};
|
||||
|
||||
delete = {
|
||||
delete = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
pageName = "UIxMailViewContainer";
|
||||
actionName = "delete";
|
||||
};
|
||||
trash = {
|
||||
trash = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
pageName = "UIxMailViewContainer";
|
||||
actionName = "trash";
|
||||
};
|
||||
junk = {
|
||||
junk = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
pageName = "UIxMailViewContainer";
|
||||
actionName = "junk";
|
||||
};
|
||||
edit = {
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
pageName = "UIxMailEditor";
|
||||
};
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailEditorAction";
|
||||
actionClass = "UIxMailEditorAction";
|
||||
actionName = "compose";
|
||||
};
|
||||
reply = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailReplyAction";
|
||||
actionClass = "UIxMailReplyAction";
|
||||
actionName = "reply";
|
||||
};
|
||||
replyall = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailReplyAction";
|
||||
actionClass = "UIxMailReplyAction";
|
||||
actionName = "replyall";
|
||||
};
|
||||
forward = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailForwardAction";
|
||||
actionClass = "UIxMailForwardAction";
|
||||
actionName = "forward";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
SOGoMailAccounts = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = ( /* the toolbar groups */
|
||||
( /* first group */
|
||||
{ link = "getMail";
|
||||
image = "tb-mail-getmail-flat-24x24.png";
|
||||
cssClass = "tbicon_getmail"; label = "Get Mail"; },
|
||||
)
|
||||
);
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAccountsView";
|
||||
pageName = "UIxMailAccountsView";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAccountsView";
|
||||
pageName = "UIxMailAccountsView";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
SOGoMailAccount = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailAccount.toolbar";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAccountView";
|
||||
pageName = "UIxMailAccountView";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAccountView";
|
||||
pageName = "UIxMailAccountView";
|
||||
};
|
||||
addressbook = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAddressbook";
|
||||
pageName = "UIxMailAddressbook";
|
||||
};
|
||||
anais = {
|
||||
protectedBy = "View";
|
||||
@@ -273,12 +270,12 @@
|
||||
};
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailEditorAction";
|
||||
actionClass = "UIxMailEditorAction";
|
||||
actionName = "compose";
|
||||
};
|
||||
createFolder = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAccountView";
|
||||
pageName = "UIxMailAccountView";
|
||||
actionName = "createFolder";
|
||||
};
|
||||
};
|
||||
@@ -330,43 +327,43 @@
|
||||
methods = {
|
||||
view = { /* somewhat hackish */
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
pageName = "UIxMailEditor";
|
||||
};
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
pageName = "UIxMailEditor";
|
||||
actionName = "edit";
|
||||
};
|
||||
save = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
pageName = "UIxMailEditor";
|
||||
actionName = "save";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
pageName = "UIxMailEditor";
|
||||
actionName = "delete";
|
||||
};
|
||||
|
||||
viewAttachments = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditorAttach";
|
||||
pageName = "UIxMailEditorAttach";
|
||||
actionName = "viewAttachments";
|
||||
};
|
||||
attach = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditorAttach";
|
||||
pageName = "UIxMailEditorAttach";
|
||||
actionName = "attach";
|
||||
};
|
||||
deleteAttachment = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditorAttach";
|
||||
pageName = "UIxMailEditorAttach";
|
||||
actionName = "deleteAttachment";
|
||||
};
|
||||
|
||||
send = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
pageName = "UIxMailEditor";
|
||||
actionName = "send";
|
||||
};
|
||||
addressbook = {
|
||||
@@ -382,7 +379,7 @@
|
||||
};
|
||||
|
||||
/* Sieve */
|
||||
|
||||
|
||||
SOGoSieveScriptsFolder = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
@@ -402,7 +399,7 @@
|
||||
},
|
||||
),
|
||||
( /* second group
|
||||
{ link = "#";
|
||||
{ link = "#";
|
||||
cssClass = "tbicon_delete"; label = "Delete"; },*/
|
||||
),
|
||||
);
|
||||
@@ -411,11 +408,11 @@
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxFilterList";
|
||||
pageName = "UIxFilterList";
|
||||
};
|
||||
create = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxFilterList";
|
||||
pageName = "UIxFilterList";
|
||||
actionName = "create";
|
||||
};
|
||||
};
|
||||
@@ -442,17 +439,17 @@
|
||||
methods = {
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxSieveEditor";
|
||||
pageName = "UIxSieveEditor";
|
||||
actionName = "edit";
|
||||
};
|
||||
save = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxSieveEditor";
|
||||
pageName = "UIxSieveEditor";
|
||||
actionName = "save";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxSieveEditor";
|
||||
pageName = "UIxSieveEditor";
|
||||
actionName = "delete";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user