mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
Monotone-Parent: 4f6055656f29743c9da3d3dcce84f449939717bf
Monotone-Revision: 60ad639c204e75de92c1111a09d2ecfe2cbd655b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-07-11T17:53:09 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -88,3 +88,8 @@
|
||||
/* MailMoveToPopUp */
|
||||
|
||||
"MoveTo" = "Déplacer vers";
|
||||
|
||||
/* Address Popup menu */
|
||||
"Add to Address Book..." = "Ajouter au carnet d'adresses";
|
||||
"Compose Mail To" = "Écrire à";
|
||||
"Create Filter From Message..." = "Créer un filtre à partir du message...";
|
||||
|
||||
@@ -45,6 +45,7 @@ MailerUI_OBJC_FILES += \
|
||||
MailerUI_RESOURCE_FILES += \
|
||||
Version \
|
||||
product.plist \
|
||||
UIxMailView.js \
|
||||
Toolbars/*.toolbar \
|
||||
Images/*.png
|
||||
|
||||
|
||||
@@ -27,9 +27,12 @@
|
||||
#include <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#include "common.h"
|
||||
|
||||
#import "../Common/NSString+URL.h"
|
||||
|
||||
@implementation UIxMailEditorAction
|
||||
|
||||
- (void)dealloc {
|
||||
- (void)dealloc
|
||||
{
|
||||
[self->newDraft release];
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -74,42 +77,63 @@
|
||||
|
||||
/* compose */
|
||||
|
||||
- (id)composeAction {
|
||||
- (id) composeAction
|
||||
{
|
||||
SOGoDraftsFolder *drafts;
|
||||
WOResponse *r;
|
||||
NSString *url;
|
||||
id accountFolder;
|
||||
|
||||
NSString *urlBase, *url;
|
||||
NSMutableDictionary *urlParams;
|
||||
id parameter;
|
||||
id returnValue;
|
||||
|
||||
drafts = [self draftsFolder];
|
||||
if (![drafts isNotNull])
|
||||
return [self didNotFindDraftsError];
|
||||
if ([drafts isKindOfClass:[NSException class]])
|
||||
return drafts;
|
||||
if ([drafts isNotNull])
|
||||
{
|
||||
if ([drafts isKindOfClass: [NSException class]])
|
||||
returnValue = drafts;
|
||||
else
|
||||
{
|
||||
urlBase = [drafts newObjectBaseURLInContext: [self context]];
|
||||
if ([urlBase isNotNull])
|
||||
{
|
||||
urlParams = [NSMutableDictionary new];
|
||||
[urlParams autorelease];
|
||||
|
||||
/* attach mail-account info */
|
||||
parameter
|
||||
= [[self clientObject] valueForKey: @"mailAccountFolder"];
|
||||
if (parameter && ![parameter isExceptionOrNull])
|
||||
[urlParams setObject: [parameter nameInContainer]
|
||||
forKey: @"account"];
|
||||
|
||||
parameter = [[self request] formValueForKey: @"mailto"];
|
||||
if (parameter)
|
||||
[urlParams setObject: parameter
|
||||
forKey: @"mailto"];
|
||||
|
||||
url = [urlBase composeURLWithAction: @"edit"
|
||||
parameters: urlParams
|
||||
andHash: NO];
|
||||
|
||||
/* perform redirect */
|
||||
|
||||
[self debugWithFormat:@"compose on %@: %@", drafts, url];
|
||||
|
||||
url = [drafts newObjectBaseURLInContext:[self context]];
|
||||
if (![url isNotNull])
|
||||
return [self couldNotCreateDraftError:drafts];
|
||||
|
||||
if (![url hasSuffix:@"/"]) url = [url stringByAppendingString:@"/"];
|
||||
url = [url stringByAppendingString:@"edit"];
|
||||
|
||||
/* attach mail-account info */
|
||||
|
||||
accountFolder = [[self clientObject] valueForKey:@"mailAccountFolder"];
|
||||
if (![accountFolder isExceptionOrNull]) {
|
||||
url = [url stringByAppendingString:@"?account="];
|
||||
url = [url stringByAppendingString:[accountFolder nameInContainer]];
|
||||
}
|
||||
|
||||
/* perform redirect */
|
||||
|
||||
[self debugWithFormat:@"compose on %@: %@", drafts, url];
|
||||
|
||||
r = [[self context] response];
|
||||
[r setStatus:302 /* moved */];
|
||||
[r setHeader:url forKey:@"location"];
|
||||
[self reset];
|
||||
return r;
|
||||
r = [[self context] response];
|
||||
[r setStatus: 302 /* move d */];
|
||||
[r setHeader: url forKey: @"location"];
|
||||
[self reset];
|
||||
|
||||
returnValue = r;
|
||||
}
|
||||
else
|
||||
returnValue = [self couldNotCreateDraftError: drafts];
|
||||
}
|
||||
}
|
||||
else
|
||||
returnValue = [self didNotFindDraftsError];
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
/* creating new draft object */
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
#include "../Common/UIxPageFrame.h"
|
||||
|
||||
@interface UIxMailMainFrame : UIxComponent
|
||||
@interface UIxMailMainFrame : UIxPageFrame
|
||||
{
|
||||
NSString *title;
|
||||
NSString *rootURL;
|
||||
NSString *userRootURL;
|
||||
id item;
|
||||
struct {
|
||||
int hideFolderTree:1;
|
||||
int hideFrame:1; /* completely disables all the frame around the comp. */
|
||||
@@ -61,8 +61,6 @@ static NSString *treeRootClassName = nil;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->item release];
|
||||
[self->title release];
|
||||
[self->rootURL release];
|
||||
[self->userRootURL release];
|
||||
[super dealloc];
|
||||
@@ -88,23 +86,6 @@ static NSString *treeRootClassName = nil;
|
||||
return self->mmfFlags.hideFrame ? YES : NO;
|
||||
}
|
||||
|
||||
- (void)setTitle:(NSString *)_value {
|
||||
ASSIGNCOPY(self->title, _value);
|
||||
}
|
||||
- (NSString *)title {
|
||||
if ([self->title length] == 0)
|
||||
return @"OpenGroupware.org";
|
||||
|
||||
return self->title;
|
||||
}
|
||||
|
||||
- (void)setItem:(id)_item {
|
||||
ASSIGN(self->item, _item);
|
||||
}
|
||||
- (id)item {
|
||||
return self->item;
|
||||
}
|
||||
|
||||
- (NSString *)pageFormURL {
|
||||
NSString *u;
|
||||
NSRange r;
|
||||
@@ -161,13 +142,6 @@ static NSString *treeRootClassName = nil;
|
||||
return nil;
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void)sleep {
|
||||
[self->item release]; self->item = nil;
|
||||
[super sleep];
|
||||
}
|
||||
|
||||
/* URL generation */
|
||||
// TODO: I think all this should be done by the clientObject?!
|
||||
// TODO: is the stuff below necessary at all in the mailer frame?
|
||||
@@ -236,24 +210,6 @@ static NSString *treeRootClassName = nil;
|
||||
@"</script>", errorText];
|
||||
}
|
||||
|
||||
/* URLs */
|
||||
|
||||
- (NSString *)relativeHomePath {
|
||||
return [self relativePathToUserFolderSubPath:@""];
|
||||
}
|
||||
|
||||
- (NSString *)relativeCalendarPath {
|
||||
return [self relativePathToUserFolderSubPath:@"Calendar/"];
|
||||
}
|
||||
|
||||
- (NSString *)relativeContactsPath {
|
||||
return [self relativePathToUserFolderSubPath:@"Contacts/"];
|
||||
}
|
||||
|
||||
- (NSString *)relativeMailPath {
|
||||
return [self relativePathToUserFolderSubPath:@"Mail/"];
|
||||
}
|
||||
|
||||
@end /* UIxMailMainFrame */
|
||||
|
||||
@implementation UIxMailPanelFrame
|
||||
|
||||
@@ -102,11 +102,20 @@ static NSArray *headers = nil;
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setTo:(NSArray *)_to {
|
||||
- (void)setTo:(NSArray *)_to
|
||||
{
|
||||
_to = [self properlySplitAddresses:_to];
|
||||
ASSIGNCOPY(self->to, _to);
|
||||
}
|
||||
- (NSArray *)to {
|
||||
|
||||
- (NSArray *) to
|
||||
{
|
||||
NSString *mailto;
|
||||
|
||||
mailto = [self queryParameterForKey:@"mailto"];
|
||||
if ([mailto length] > 0 && ![to count])
|
||||
to = [NSArray arrayWithObject: mailto];
|
||||
|
||||
return self->to;
|
||||
}
|
||||
|
||||
@@ -114,6 +123,7 @@ static NSArray *headers = nil;
|
||||
_cc = [self properlySplitAddresses:_cc];
|
||||
ASSIGNCOPY(self->cc, _cc);
|
||||
}
|
||||
|
||||
- (NSArray *)cc {
|
||||
return self->cc;
|
||||
}
|
||||
|
||||
@@ -306,15 +306,15 @@
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailEditorAction";
|
||||
actionClass = "UIxMailEditorAction";
|
||||
actionName = "compose";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user