mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-28 06:35:26 +00:00
merge of '7659385c293a64fbec59fda5d5bf34bcd7b51d96'
and 'f8b29d68c36441f92d7ffe8056a95fd25a2fd409' Monotone-Parent: 7659385c293a64fbec59fda5d5bf34bcd7b51d96 Monotone-Parent: f8b29d68c36441f92d7ffe8056a95fd25a2fd409 Monotone-Revision: 7822887b219614cd66e9d1e19da4799f884657bf Monotone-Author: dgehl@inverse.ca Monotone-Date: 2007-10-18T01:44:28 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
"Address Book" = "Address Book";
|
||||
"Mail" = "Mail";
|
||||
"Preferences" = "Preferences";
|
||||
"Logoff" = "Logoff";
|
||||
"Sign Out" = "Sign Out";
|
||||
"Right Administration" = "Right Administration";
|
||||
"Log Console (dev.)" = "Log Console (dev.)";
|
||||
|
||||
@@ -27,8 +27,22 @@
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
|
||||
"browserNotCompatible" = "We've detected that your browser version is currently not supported on this site. Our recommendation is to use Firefox. Click on the link bellow to download the most current version of this browser.";
|
||||
"alternativeBrowsers" = "Alternatively, you can also use the following compatible browsers";
|
||||
"alternativeBrowserSafari" = "Alternatively, you can also use Safari.";
|
||||
"Download" = "Download";
|
||||
|
||||
/* generic.js */
|
||||
"Unable to subscribe to that folder!" = "Unable to subscribe to that folder!";
|
||||
"You cannot subscribe to a folder that you own!" = "You cannot subscribe to a folder that you own!";
|
||||
"Unable to unsubscribe from that folder!" = "Unable to unsubscribe from that folder!";
|
||||
"You cannot unsubscribe from a folder that you own!" = "You cannot unsubscribe from a folder that you own!";
|
||||
"Unable to subscribe to that folder!"
|
||||
= "Unable to subscribe to that folder!";
|
||||
"You cannot subscribe to a folder that you own!"
|
||||
= "You cannot subscribe to a folder that you own!";
|
||||
"Unable to unsubscribe from that folder!"
|
||||
= "Unable to unsubscribe from that folder!";
|
||||
"You cannot unsubscribe from a folder that you own!"
|
||||
= "You cannot unsubscribe from a folder that you own!";
|
||||
"Unable to rename that folder!" = "Unable to rename that folder!";
|
||||
"You have already subscribed to that folder!"
|
||||
= "You have already subscribed to that folder!";
|
||||
"The user rights cannot be edited for this object!"
|
||||
= "The user rights cannot be edited for this object!";
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"Address Book" = "Carnet d'adresses";
|
||||
"Mail" = "Courrier";
|
||||
"Preferences" = "Préférences";
|
||||
"Logoff" = "Quitter";
|
||||
"Sign Out" = "Quitter";
|
||||
"Right Administration" = "Partage";
|
||||
"Log Console (dev.)" = "Journal (dév.)";
|
||||
|
||||
@@ -28,8 +28,18 @@
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
|
||||
"browserNotCompatible" = "La version de votre navigateur Web n'est présentement pas supportée par ce site. Nous recommandons d'utiliser Firefox. Vous trouverez un lien vers la plus récente version de ce navigateur ci-dessous:";
|
||||
"alternativeBrowsers" = "Comme alternative, vous pouvez aussi utiliser les navigateurs suivants:";
|
||||
"alternativeBrowserSafari" = "Comme alternative, vous pouvez aussi utiliser Safari.";
|
||||
"Download" = "Télécharger";
|
||||
|
||||
/* generic.js */
|
||||
"Unable to subscribe to that folder!" = "Impossible de s'abonner à ce dossier.";
|
||||
"You cannot subscribe to a folder that you own!" = "Impossible de vous abonner à un dossier qui vous appartient.";
|
||||
"Unable to unsubscribe from that folder!" = "Impossible de se désabonner de ce dossier.";
|
||||
"You cannot unsubscribe from a folder that you own!" = "Impossible de vous désabonner d'un dossier qui vous appartient.";
|
||||
"Unable to rename that folder!" = "Impossible de renommer ce dossier.";
|
||||
"You have already subscribed to that folder!"
|
||||
= "Vous êtes déja abonné à ce dossier.";
|
||||
"The user rights cannot be edited for this object!"
|
||||
= "Les droits sur cet objet ne peuvent pas être édités.";
|
||||
|
||||
@@ -17,6 +17,7 @@ CommonUI_OBJC_FILES += \
|
||||
UIxAclEditor.m \
|
||||
UIxObjectActions.m \
|
||||
UIxFolderActions.m \
|
||||
UIxParentFolderActions.m \
|
||||
UIxElemBuilder.m \
|
||||
UIxTabView.m \
|
||||
UIxTabItem.m \
|
||||
@@ -38,6 +39,9 @@ CommonUI_LOCALIZED_RESOURCE_FILES += \
|
||||
|
||||
# make
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/sope-gdl1/
|
||||
ADDITIONAL_LIB_DIRS += -L../../SOPE/sope-gdl1/GDLContentStore/obj/
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
|
||||
@@ -19,17 +19,24 @@
|
||||
"noJavascriptError" = "SOGo requiert l'utilisation de Javascript. Veuillez vous assurer que cette option est disponible et activée dans votre fureteur.";
|
||||
"noJavascriptRetry" = "Réessayer";
|
||||
|
||||
"Owner:" = "Propriétaire :";
|
||||
"Add..." = "Hinzufügen...";
|
||||
"Remove" = "Löschen";
|
||||
"Owner:" = "Besitzer:";
|
||||
"Associated Users:" = "Utilisateurs associés :";
|
||||
"(Unchecked = assistant, checked = delegate)" = "(Coché = assistant, décoché = délégué)";
|
||||
"Publish the Free/Busy information" = "Publier l'occupation du temps";
|
||||
|
||||
"Default Roles" = "Rôles par défaut";
|
||||
"Default Roles" = "Standard-Rollen";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
"Sorry, the user rights can not be configured for that object." = "Leider können die Benutzerrechte für dieses Objekt nicht konfiguriert werden.";
|
||||
|
||||
/* generic.js */
|
||||
"Unable to subscribe to that folder!" = "Impossible de s'abonner à ce dossier.";
|
||||
"You cannot subscribe to a folder that you own!" = "Impossible de vous abonner à un dossier qui vous appartient.";
|
||||
"Unable to unsubscribe from that folder!" = "Impossible de se désabonner de ce dossier.";
|
||||
"You cannot unsubscribe from a folder that you own!" = "Impossible de vous désabonner d'un dossier qui vous appartient.";
|
||||
"Unable to subscribe to that folder!" = "Unmöglich sich an diesem Ordner zu abonnieren.";
|
||||
"You cannot subscribe to a folder that you own!" = "Unmöglich sich an einem Ordner zu abonnieren, der Ihnen selbst gehört.";
|
||||
"Unable to unsubscribe from that folder!" = "Unmöglich sich von diesem Ordner zu des-abonnieren.";
|
||||
"You cannot unsubscribe from a folder that you own!" = "Unmöglich sich von einem Ordner zu des-abonnieren, der Ihnen selbst gehört.";
|
||||
"Unable to rename that folder!" = "Unable to rename that folder!";
|
||||
"You have already subscribed to that folder!"
|
||||
= "You have already subscribed to that folder!";
|
||||
"The user rights cannot be edited for this object!"
|
||||
= "The user rights cannot be edited for this object!";
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
- (NSString *) currentUser;
|
||||
|
||||
- (NSString *) ownerName;
|
||||
- (BOOL) hasOwner;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -87,6 +87,15 @@
|
||||
return [self _displayNameForUID: ownerLogin];
|
||||
}
|
||||
|
||||
- (BOOL) hasOwner
|
||||
{
|
||||
NSString *ownerLogin;
|
||||
|
||||
ownerLogin = [[self clientObject] ownerInContext: context];
|
||||
|
||||
return (![ownerLogin isEqualToString: @"nobody"]);
|
||||
}
|
||||
|
||||
- (NSString *) defaultUserID
|
||||
{
|
||||
if (!defaultUserID)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
NSString *owner;
|
||||
NSString *login;
|
||||
NSString *baseFolder;
|
||||
NSMutableString *subscriptionPointer;
|
||||
NSString *subscriptionPointer;
|
||||
NSMutableDictionary *moduleSettings;
|
||||
BOOL isMailInvitation;
|
||||
}
|
||||
|
||||
+125
-69
@@ -31,12 +31,16 @@
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGObjWeb/SoSecurityManager.h>
|
||||
#import <NGObjWeb/SoClassSecurityInfo.h>
|
||||
|
||||
#import <SoObjects/SOGo/LDAPUserManager.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoObject.h>
|
||||
#import <SoObjects/SOGo/SOGoFolder.h>
|
||||
#import <SoObjects/SOGo/SOGoPermissions.h>
|
||||
|
||||
#import "WODirectAction+SOGo.h"
|
||||
|
||||
#import "UIxFolderActions.h"
|
||||
|
||||
@implementation UIxFolderActions
|
||||
@@ -46,7 +50,8 @@
|
||||
|
||||
- (void) _setupContext
|
||||
{
|
||||
NSString *clientClass, *mailInvitationParam;
|
||||
NSString *folder, *mailInvitationParam;
|
||||
NSArray *realFolderPath;
|
||||
SOGoUser *activeUser;
|
||||
|
||||
activeUser = [context activeUser];
|
||||
@@ -54,13 +59,7 @@
|
||||
clientObject = [self clientObject];
|
||||
owner = [clientObject ownerInContext: nil];
|
||||
|
||||
clientClass = NSStringFromClass([clientObject class]);
|
||||
if ([clientClass isEqualToString: @"SOGoContactGCSFolder"])
|
||||
baseFolder = @"Contacts";
|
||||
else if ([clientClass isEqualToString: @"SOGoAppointmentFolder"])
|
||||
baseFolder = @"Calendar";
|
||||
else
|
||||
baseFolder = nil;
|
||||
baseFolder = [[clientObject container] nameInContainer];
|
||||
|
||||
um = [LDAPUserManager sharedUserManager];
|
||||
ud = [activeUser userSettings];
|
||||
@@ -72,27 +71,29 @@
|
||||
}
|
||||
[ud setObject: moduleSettings forKey: baseFolder];
|
||||
|
||||
subscriptionPointer = [NSMutableString stringWithFormat: @"%@:%@",
|
||||
owner, baseFolder];
|
||||
if ([baseFolder isEqualToString: @"Contacts"])
|
||||
[subscriptionPointer appendFormat: @"/%@",
|
||||
[clientObject nameInContainer]];
|
||||
realFolderPath = [[clientObject nameInContainer]
|
||||
componentsSeparatedByString: @"_"];
|
||||
if ([realFolderPath count] > 1)
|
||||
folder = [realFolderPath objectAtIndex: 1];
|
||||
else
|
||||
folder = [realFolderPath objectAtIndex: 0];
|
||||
subscriptionPointer = [NSString stringWithFormat: @"%@:%@/%@",
|
||||
owner, baseFolder, folder];
|
||||
|
||||
mailInvitationParam
|
||||
= [[context request] formValueForKey: @"mail-invitation"];
|
||||
isMailInvitation = [mailInvitationParam boolValue];
|
||||
}
|
||||
|
||||
- (WOResponse *) _realActionWithFolderName: (NSDictionary *) folderDict
|
||||
- (WOResponse *) _realSubscribe: (BOOL) reallyDo
|
||||
{
|
||||
WOResponse *response;
|
||||
NSMutableDictionary *folderSubscription;
|
||||
NSMutableArray *folderSubscription;
|
||||
NSString *mailInvitationURL;
|
||||
|
||||
response = [context response];
|
||||
if ([owner isEqualToString: login])
|
||||
{
|
||||
[response setStatus: 403];
|
||||
response = [self responseWithStatus: 403];
|
||||
[response appendContentString:
|
||||
@"You cannot (un)subscribe to a folder that you own!"];
|
||||
}
|
||||
@@ -100,17 +101,17 @@
|
||||
{
|
||||
folderSubscription
|
||||
= [moduleSettings objectForKey: @"SubscribedFolders"];
|
||||
if (!folderSubscription)
|
||||
if (!(folderSubscription
|
||||
&& [folderSubscription isKindOfClass: [NSMutableArray class]]))
|
||||
{
|
||||
folderSubscription = [NSMutableDictionary dictionary];
|
||||
folderSubscription = [NSMutableArray array];
|
||||
[moduleSettings setObject: folderSubscription
|
||||
forKey: @"SubscribedFolders"];
|
||||
}
|
||||
if (folderDict)
|
||||
[folderSubscription setObject: folderDict
|
||||
forKey: subscriptionPointer];
|
||||
if (reallyDo)
|
||||
[folderSubscription addObjectUniquely: subscriptionPointer];
|
||||
else
|
||||
[folderSubscription removeObjectForKey: subscriptionPointer];
|
||||
[folderSubscription removeObject: subscriptionPointer];
|
||||
|
||||
[ud synchronize];
|
||||
|
||||
@@ -119,12 +120,12 @@
|
||||
mailInvitationURL
|
||||
= [[clientObject soURLToBaseContainerForCurrentUser]
|
||||
absoluteString];
|
||||
[response setStatus: 302];
|
||||
response = [self responseWithStatus: 302];
|
||||
[response setHeader: mailInvitationURL
|
||||
forKey: @"location"];
|
||||
}
|
||||
else
|
||||
[response setStatus: 204];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
|
||||
return response;
|
||||
@@ -132,73 +133,73 @@
|
||||
|
||||
- (WOResponse *) subscribeAction
|
||||
{
|
||||
NSString *email;
|
||||
NSMutableDictionary *folderDict;
|
||||
NSString *folderName;
|
||||
|
||||
[self _setupContext];
|
||||
email = [NSString stringWithFormat: @"%@ <%@>",
|
||||
[um getCNForUID: owner],
|
||||
[um getEmailForUID: owner]];
|
||||
if ([baseFolder isEqualToString: @"Contacts"])
|
||||
folderName = [NSString stringWithFormat: @"%@ (%@)",
|
||||
[clientObject nameInContainer], email];
|
||||
else
|
||||
folderName = email;
|
||||
|
||||
folderDict = [NSMutableDictionary dictionary];
|
||||
[folderDict setObject: folderName forKey: @"displayName"];
|
||||
[folderDict setObject: [NSNumber numberWithBool: NO] forKey: @"active"];
|
||||
|
||||
return [self _realActionWithFolderName: folderDict];
|
||||
return [self _realSubscribe: YES];
|
||||
}
|
||||
|
||||
- (WOResponse *) unsubscribeAction
|
||||
{
|
||||
[self _setupContext];
|
||||
|
||||
return [self _realActionWithFolderName: nil];
|
||||
return [self _realSubscribe: NO];
|
||||
}
|
||||
|
||||
- (WOResponse *) canAccessContentAction
|
||||
{
|
||||
WOResponse *response;
|
||||
#warning IMPROVEMENTS REQUIRED!
|
||||
NSArray *acls;
|
||||
// NSEnumerator *userAcls;
|
||||
// NSString *currentAcl;
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 204];
|
||||
[self _setupContext];
|
||||
|
||||
// NSLog(@"canAccessContentAction %@, owner %@", subscriptionPointer, owner);
|
||||
|
||||
return response;
|
||||
if ([login isEqualToString: owner] || [owner isEqualToString: @"nobody"]) {
|
||||
return [self responseWith204];
|
||||
}
|
||||
else {
|
||||
acls = [clientObject aclsForUser: login];
|
||||
// userAcls = [acls objectEnumerator];
|
||||
// currentAcl = [userAcls nextObject];
|
||||
// while (currentAcl) {
|
||||
// NSLog(@"ACL login %@, owner %@, folder %@: %@",
|
||||
// login, owner, baseFolder, currentAcl);
|
||||
// currentAcl = [userAcls nextObject];
|
||||
// }
|
||||
if (([[clientObject folderType] isEqualToString: @"Contact"] && [acls containsObject: SOGoRole_ObjectReader]) ||
|
||||
([[clientObject folderType] isEqualToString: @"Appointment"] && [acls containsObject: SOGoRole_AuthorizedSubscriber])) {
|
||||
return [self responseWith204];
|
||||
}
|
||||
}
|
||||
|
||||
return [self responseWithStatus: 403];
|
||||
}
|
||||
|
||||
- (WOResponse *) _realFolderActivation: (BOOL) makeActive
|
||||
{
|
||||
WOResponse *response;
|
||||
NSMutableDictionary *folderSubscription, *folderDict;
|
||||
NSNumber *active;
|
||||
|
||||
response = [context response];
|
||||
NSMutableArray *folderSubscription;
|
||||
NSString *folderName;
|
||||
|
||||
[self _setupContext];
|
||||
active = [NSNumber numberWithBool: makeActive];
|
||||
if ([owner isEqualToString: login])
|
||||
[moduleSettings setObject: active forKey: @"activateUserFolder"];
|
||||
else
|
||||
folderSubscription
|
||||
= [moduleSettings objectForKey: @"ActiveFolders"];
|
||||
if (!folderSubscription)
|
||||
{
|
||||
folderSubscription
|
||||
= [moduleSettings objectForKey: @"SubscribedFolders"];
|
||||
if (folderSubscription)
|
||||
{
|
||||
folderDict = [folderSubscription objectForKey: subscriptionPointer];
|
||||
if (folderDict)
|
||||
[folderDict setObject: active
|
||||
forKey: @"active"];
|
||||
}
|
||||
folderSubscription = [NSMutableArray array];
|
||||
[moduleSettings setObject: folderSubscription forKey: @"ActiveFolders"];
|
||||
}
|
||||
|
||||
[ud synchronize];
|
||||
[response setStatus: 204];
|
||||
folderName = [clientObject nameInContainer];
|
||||
if (makeActive)
|
||||
[folderSubscription addObjectUniquely: folderName];
|
||||
else
|
||||
[folderSubscription removeObject: folderName];
|
||||
|
||||
return response;
|
||||
[ud synchronize];
|
||||
|
||||
return [self responseWith204];
|
||||
}
|
||||
|
||||
- (WOResponse *) activateFolderAction
|
||||
@@ -211,4 +212,59 @@
|
||||
return [self _realFolderActivation: NO];
|
||||
}
|
||||
|
||||
- (WOResponse *) deleteFolderAction
|
||||
{
|
||||
WOResponse *response;
|
||||
|
||||
response = (WOResponse *) [[self clientObject] delete];
|
||||
if (!response)
|
||||
response = [self responseWith204];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) renameFolderAction
|
||||
{
|
||||
WOResponse *response;
|
||||
NSString *folderName;
|
||||
|
||||
folderName = [[context request] formValueForKey: @"name"];
|
||||
if ([folderName length] > 0)
|
||||
{
|
||||
clientObject = [self clientObject];
|
||||
[clientObject renameTo: folderName];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
{
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Missing 'name' parameter."];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (id) batchDeleteAction
|
||||
{
|
||||
WOResponse *response;
|
||||
NSString *idsParam;
|
||||
NSArray *ids;
|
||||
|
||||
idsParam = [[context request] formValueForKey: @"ids"];
|
||||
ids = [idsParam componentsSeparatedByString: @"/"];
|
||||
if ([ids count])
|
||||
{
|
||||
clientObject = [self clientObject];
|
||||
[clientObject deleteEntriesWithIds: ids];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
{
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"At least 1 id required."];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#define UIXPAGEFRAME_H
|
||||
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
#import <NGObjWeb/WEClientCapabilities.h>
|
||||
|
||||
@interface WOComponent (PopupExtension)
|
||||
|
||||
@@ -56,6 +57,10 @@
|
||||
- (void) setToolbar: (NSString *) newToolbar;
|
||||
- (NSString *) toolbar;
|
||||
|
||||
- (BOOL) isCompatibleBrowser;
|
||||
- (BOOL) isIE7Compatible;
|
||||
- (BOOL) isMac;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXPAGEFRAME_H */
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
WOComponent *page;
|
||||
NSString *pageJSFilename;
|
||||
|
||||
page = [[self context] page];
|
||||
page = [context page];
|
||||
pageJSFilename = [NSString stringWithFormat: @"%@.js",
|
||||
NSStringFromClass([page class])];
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
WOComponent *page;
|
||||
NSString *fwJSFilename;
|
||||
|
||||
page = [[self context] page];
|
||||
page = [context page];
|
||||
fwJSFilename = [NSString stringWithFormat: @"%@.js",
|
||||
[page frameworkName]];
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
{
|
||||
WOComponent *page;
|
||||
|
||||
page = [[self context] page];
|
||||
page = [context page];
|
||||
|
||||
return [NSString stringWithFormat: @"%@.SOGo", [page frameworkName]];
|
||||
}
|
||||
@@ -214,7 +214,7 @@
|
||||
WOComponent *page;
|
||||
NSString *pageJSFilename;
|
||||
|
||||
page = [[self context] page];
|
||||
page = [context page];
|
||||
pageJSFilename = [NSString stringWithFormat: @"%@.css",
|
||||
NSStringFromClass([page class])];
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
WOComponent *page;
|
||||
NSString *fwJSFilename;
|
||||
|
||||
page = [[self context] page];
|
||||
page = [context page];
|
||||
fwJSFilename = [NSString stringWithFormat: @"%@.css",
|
||||
[page frameworkName]];
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
- (NSString *) thisPageURL
|
||||
{
|
||||
return [[[self context] page] uri];
|
||||
return [[context page] uri];
|
||||
}
|
||||
|
||||
- (BOOL) hasPageSpecificCSS
|
||||
@@ -258,4 +258,47 @@
|
||||
return toolbar;
|
||||
}
|
||||
|
||||
/* browser/os identification */
|
||||
|
||||
- (BOOL) isCompatibleBrowser
|
||||
{
|
||||
WEClientCapabilities *cc;
|
||||
|
||||
cc = [[context request] clientCapabilities];
|
||||
|
||||
//NSLog(@"Browser = %@", [cc description]);
|
||||
NSLog(@"User agent = %@", [cc userAgent]);
|
||||
//NSLog(@"Browser major version = %i", [cc majorVersion]);
|
||||
|
||||
return (([[cc userAgentType] isEqualToString: @"IE"]
|
||||
&& [cc majorVersion] >= 7)
|
||||
|| ([[cc userAgentType] isEqualToString: @"Mozilla"]
|
||||
&& [cc majorVersion] >= 5)
|
||||
|| ([[cc userAgentType] isEqualToString: @"Safari"]
|
||||
&& [cc majorVersion] >= 4)
|
||||
// ([[cc userAgentType] isEqualToString: @"Konqueror"])
|
||||
);
|
||||
}
|
||||
|
||||
- (BOOL) isIE7Compatible
|
||||
{
|
||||
WEClientCapabilities *cc;
|
||||
|
||||
cc = [[context request] clientCapabilities];
|
||||
|
||||
return ([cc isWindowsBrowser] &&
|
||||
([[cc userAgent] rangeOfString: @"NT 5.1"].location != NSNotFound ||
|
||||
[[cc userAgent] rangeOfString: @"NT 6"].location != NSNotFound));
|
||||
}
|
||||
|
||||
- (BOOL) isMac
|
||||
{
|
||||
WEClientCapabilities *cc;
|
||||
|
||||
cc = [[context request] clientCapabilities];
|
||||
|
||||
return [cc isMacBrowser];
|
||||
}
|
||||
|
||||
|
||||
@end /* UIxPageFrame */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SOGoACLEnglishRemovalAdvisory.m - this file is part of SOGo
|
||||
/* UIxParentFolderActions.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 Inverse groupe conseil
|
||||
*
|
||||
@@ -20,13 +20,12 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "SOGoACLEnglishRemovalAdvisory.h"
|
||||
#ifndef UIXPARENTFOLDERACTIONS_H
|
||||
#define UIXPARENTFOLDERACTIONS_H
|
||||
|
||||
@implementation SOGoACLEnglishRemovalAdvisory
|
||||
|
||||
- (NSString *) aclMethod
|
||||
{
|
||||
return @"add";
|
||||
}
|
||||
#import <NGObjWeb/WODirectAction.h>
|
||||
|
||||
@interface UIxParentFolderActions : WODirectAction
|
||||
@end
|
||||
|
||||
#endif /* UIXPARENTFOLDERACTIONS_H */
|
||||
@@ -0,0 +1,61 @@
|
||||
/* UIxParentFolderActions.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 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/NSString.h>
|
||||
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
|
||||
#import <UI/Common/WODirectAction+SOGo.h>
|
||||
#import <SoObjects/SOGo/SOGoParentFolder.h>
|
||||
|
||||
#import "UIxParentFolderActions.h"
|
||||
|
||||
@implementation UIxParentFolderActions
|
||||
|
||||
- (id <WOActionResults>) createFolderAction
|
||||
{
|
||||
WOResponse *response;
|
||||
NSString *name, *nameInContainer;
|
||||
|
||||
name = [[context request] formValueForKey: @"name"];
|
||||
if ([name length] > 0)
|
||||
{
|
||||
response = (WOResponse *) [[self clientObject] newFolderWithName: name
|
||||
nameInContainer: &nameInContainer];
|
||||
if (!response)
|
||||
{
|
||||
response = [self responseWithStatus: 201];
|
||||
[response setHeader: @"text/plain; charset=us-ascii"
|
||||
forKey: @"content-type"];
|
||||
[response appendContentString: nameInContainer];
|
||||
}
|
||||
}
|
||||
else
|
||||
response = [NSException exceptionWithHTTPStatus: 400
|
||||
reason: @"The name is missing"];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -214,6 +214,15 @@
|
||||
return image;
|
||||
}
|
||||
|
||||
- (NSString *) buttonTooltip
|
||||
{
|
||||
NSString *key;
|
||||
|
||||
key = [[self buttonInfo] valueForKey: @"tooltip"];
|
||||
|
||||
return [self labelForKey: key];
|
||||
}
|
||||
|
||||
/* enable/disable buttons */
|
||||
|
||||
- (BOOL)isButtonEnabled {
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
@interface WODirectAction (SOGoExtension)
|
||||
|
||||
- (WOResponse *) responseWithStatus: (unsigned int) status;
|
||||
- (WOResponse *) responseWith204;
|
||||
- (WOResponse *) redirectToLocation: (NSString *) newLocation;
|
||||
|
||||
@end
|
||||
|
||||
@@ -28,15 +28,30 @@
|
||||
|
||||
@implementation WODirectAction (SOGoExtension)
|
||||
|
||||
- (WOResponse *) redirectToLocation: (NSString *) newLocation
|
||||
- (WOResponse *) responseWithStatus: (unsigned int) status
|
||||
{
|
||||
WOResponse *response;
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 302 /* moved */];
|
||||
[response setStatus: status];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) responseWith204
|
||||
{
|
||||
return [self responseWithStatus: 204];
|
||||
}
|
||||
|
||||
- (WOResponse *) redirectToLocation: (NSString *) newLocation
|
||||
{
|
||||
WOResponse *response;
|
||||
|
||||
response = [self responseWithStatus: 302];
|
||||
[response setHeader: newLocation forKey: @"location"];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
+114
-90
@@ -1,95 +1,119 @@
|
||||
{ /* -*-javascript-*- */
|
||||
requires = ( MAIN, Mailer );
|
||||
{ /* -*-java-*- */
|
||||
requires = ( MAIN, Mailer );
|
||||
|
||||
publicResources = (
|
||||
calendar.css,
|
||||
uix.css,
|
||||
menu_logo_top.gif,
|
||||
line_left.gif,
|
||||
line_stretch.gif,
|
||||
line_right.gif,
|
||||
box_topleft.gif,
|
||||
box_top.gif,
|
||||
box_topright.gif,
|
||||
box_left.gif,
|
||||
box_right.gif,
|
||||
box_botleft.gif,
|
||||
box_bottom.gif,
|
||||
box_botright.gif,
|
||||
tab_selected.gif,
|
||||
tab_.gif,
|
||||
corner_right.gif,
|
||||
closewindow.gif,
|
||||
OGoLogo.gif,
|
||||
upward_sorted.gif,
|
||||
downward_sorted.gif,
|
||||
non_sorted.gif
|
||||
);
|
||||
|
||||
publicResources = (
|
||||
calendar.css,
|
||||
uix.css,
|
||||
menu_logo_top.gif,
|
||||
line_left.gif,
|
||||
line_stretch.gif,
|
||||
line_right.gif,
|
||||
box_topleft.gif,
|
||||
box_top.gif,
|
||||
box_topright.gif,
|
||||
box_left.gif,
|
||||
box_right.gif,
|
||||
box_botleft.gif,
|
||||
box_bottom.gif,
|
||||
box_botright.gif,
|
||||
tab_selected.gif,
|
||||
tab_.gif,
|
||||
corner_right.gif,
|
||||
closewindow.gif,
|
||||
OGoLogo.gif,
|
||||
upward_sorted.gif,
|
||||
downward_sorted.gif,
|
||||
non_sorted.gif
|
||||
);
|
||||
factories = {
|
||||
};
|
||||
|
||||
factories = {
|
||||
};
|
||||
|
||||
categories = {
|
||||
SOGoObject = {
|
||||
methods = {
|
||||
addUserInAcls = {
|
||||
protectedBy = "SaveAcls";
|
||||
actionClass = "UIxObjectActions";
|
||||
actionName = "addUserInAcls";
|
||||
};
|
||||
removeUserFromAcls = {
|
||||
protectedBy = "SaveAcls";
|
||||
actionClass = "UIxObjectActions";
|
||||
actionName = "removeUserFromAcls";
|
||||
};
|
||||
acls = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxAclEditor";
|
||||
};
|
||||
saveAcls = {
|
||||
protectedBy = "SaveAcls";
|
||||
pageName = "UIxAclEditor";
|
||||
actionName = "saveAcls";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxUserRightsEditor";
|
||||
};
|
||||
saveUserRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxUserRightsEditor";
|
||||
actionName = "saveUserRights";
|
||||
};
|
||||
};
|
||||
categories = {
|
||||
SOGoObject = {
|
||||
methods = {
|
||||
addUserInAcls = {
|
||||
protectedBy = "SaveAcls";
|
||||
actionClass = "UIxObjectActions";
|
||||
actionName = "addUserInAcls";
|
||||
};
|
||||
removeUserFromAcls = {
|
||||
protectedBy = "SaveAcls";
|
||||
actionClass = "UIxObjectActions";
|
||||
actionName = "removeUserFromAcls";
|
||||
};
|
||||
acls = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxAclEditor";
|
||||
};
|
||||
saveAcls = {
|
||||
protectedBy = "SaveAcls";
|
||||
pageName = "UIxAclEditor";
|
||||
actionName = "saveAcls";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxUserRightsEditor";
|
||||
};
|
||||
saveUserRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxUserRightsEditor";
|
||||
actionName = "saveUserRights";
|
||||
};
|
||||
};
|
||||
SOGoFolder = {
|
||||
methods = {
|
||||
subscribe = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "subscribe";
|
||||
};
|
||||
unsubscribe = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "unsubscribe";
|
||||
};
|
||||
canAccessContent = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "canAccessContent";
|
||||
};
|
||||
activateFolder = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "activateFolder";
|
||||
};
|
||||
deactivateFolder = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "deactivateFolder";
|
||||
};
|
||||
};
|
||||
};
|
||||
SOGoParentFolder = {
|
||||
methods = {
|
||||
createFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxParentFolderActions";
|
||||
actionName = "createFolder";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
SOGoFolder = {
|
||||
methods = {
|
||||
subscribe = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "subscribe";
|
||||
};
|
||||
unsubscribe = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "unsubscribe";
|
||||
};
|
||||
canAccessContent = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "canAccessContent";
|
||||
};
|
||||
activateFolder = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "activateFolder";
|
||||
};
|
||||
deactivateFolder = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "deactivateFolder";
|
||||
};
|
||||
deleteFolder = {
|
||||
protectedBy = "SaveAcls"; /* a hack to force "owner" */
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "deleteFolder";
|
||||
};
|
||||
renameFolder = {
|
||||
protectedBy = "SaveAcls";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "renameFolder";
|
||||
};
|
||||
batchDelete = {
|
||||
protectedBy = "Delete Objects";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "batchDelete";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,6 +32,14 @@
|
||||
"invalidemailwarn" = "invalidemailwarn";
|
||||
"new" = "new";
|
||||
|
||||
/* Tooltips */
|
||||
|
||||
"Create a new address book card" = "Create a new address book card";
|
||||
"Create a new list" = "Create a new list";
|
||||
"Edit the selected card" = "Edit the selected card";
|
||||
"Send a mail message" = "Send a mail message";
|
||||
"Delete selected card or address book" = "Delete selected card or address book";
|
||||
|
||||
"htmlMailFormat_UNKNOWN" = "Unknown";
|
||||
"htmlMailFormat_FALSE" = "Plain Text";
|
||||
"htmlMailFormat_TRUE" = "HTML";
|
||||
@@ -97,6 +105,8 @@
|
||||
"Are you sure you want to delete the selected address book?"
|
||||
= "Are you sure you want to delete the selected address book?";
|
||||
|
||||
"Address Book Name" = "Address Book Name";
|
||||
|
||||
"You cannot subscribe to a folder that you own!"
|
||||
= "You cannot subscribe to a folder that you own!";
|
||||
"Unable to subscribe to that folder!"
|
||||
@@ -115,3 +125,6 @@
|
||||
= "This person can read the cards of this addressbook.";
|
||||
"This person can erase cards from this addressbook."
|
||||
= "This person can erase cards from this addressbook.";
|
||||
|
||||
"The selected contact has no email address."
|
||||
= "The selected contact has no email address.";
|
||||
|
||||
@@ -39,6 +39,14 @@
|
||||
"invalidemailwarn" = "Champ de l'email invalide, continuer quand même ?";
|
||||
"new" = "Nouveau";
|
||||
|
||||
/* Tooltips */
|
||||
|
||||
"Create a new address book card" = "Créer une nouvelle fiche";
|
||||
"Create a new list" = "Créer une nouvelle liste de diffusion";
|
||||
"Edit the selected card" = "Modifier la fiche sélectionnée";
|
||||
"Send a mail message" = "Rédiger un courrier à la sélection";
|
||||
"Delete selected card or address book" = "Supprimer la fiche sélectionnée";
|
||||
|
||||
"htmlMailFormat_UNKNOWN" = "Inconnu";
|
||||
"htmlMailFormat_FALSE" = "Texte simple (sans HTML)";
|
||||
"htmlMailFormat_TRUE" = "HTML";
|
||||
@@ -110,6 +118,8 @@
|
||||
"Are you sure you want to delete the selected address book?"
|
||||
= "Voulez-vous vraiment supprimer le carnet d'adresses sélectionné ?";
|
||||
|
||||
"Address Book Name" = "Nom du carnet d'adresses";
|
||||
|
||||
"You cannot subscribe to a folder that you own!"
|
||||
= "Vous ne pouvez pas vous inscrire à un dossier qui vous appartient!";
|
||||
"Unable to subscribe to that folder!"
|
||||
@@ -129,3 +139,6 @@
|
||||
"This person can erase cards from this addressbook."
|
||||
= "Cette personne peut effacer des fiches de ce carnet d'adresses.";
|
||||
|
||||
"The selected contact has no email address."
|
||||
= "Cette personne n'a pas d'adresse courriel.";
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@ ContactsUI_LOCALIZED_RESOURCE_FILES += \
|
||||
|
||||
# make
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/sope-gdl1/
|
||||
ADDITIONAL_LIB_DIRS += -L../../SOPE/sope-gdl1/GDLContentStore/obj/
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
"Address Books" = "Adressbücher";
|
||||
"Addresses" = "Adresses";
|
||||
"Update" = "Mettre à jour";
|
||||
"Update" = "Speichern";
|
||||
"Cancel" = "Abbrechen";
|
||||
"Common" = "Name";
|
||||
"Contact editor" = "Éditer le contact";
|
||||
@@ -50,12 +50,12 @@
|
||||
"New Card" = "Neue Karte";
|
||||
"New List" = "Neue Liste";
|
||||
"Modify" = "Eigenschaften";
|
||||
"Sharing..." = "Partage...";
|
||||
"Sharing..." = "Benutzerrechte...";
|
||||
"Write" = "Verfassen";
|
||||
"Delete" = "Löschen";
|
||||
"Instant Message" = "Messenger";
|
||||
"Add..." = "Ajouter...";
|
||||
"Remove" = "Enlever";
|
||||
"Add..." = "Hinzufügen...";
|
||||
"Remove" = "Löschen";
|
||||
|
||||
"Preferred" = "Préféré";
|
||||
"Card for %@" = "%@";
|
||||
@@ -102,29 +102,33 @@
|
||||
"Blind Carbon Copy" = "C. carbone cachée";
|
||||
|
||||
"New Addressbook..." = "Neues Adressbuch...";
|
||||
"Subscribe to an Addressbook..." = "S'inscrire à un carnet d'adresses...";
|
||||
"Subscribe to an Addressbook..." = "Abonnieren...";
|
||||
"Remove the selected Addressbook" = "Adressbuch löschen";
|
||||
|
||||
"Name of the Address Book" = "Adressbuch-Name";
|
||||
"Are you sure you want to delete the selected address book?"
|
||||
= "Voulez-vous vraiment supprimer le carnet d'adresses sélectionné ?";
|
||||
|
||||
"Address Book Name" = "Address Book Name";
|
||||
|
||||
"You cannot subscribe to a folder that you own!"
|
||||
= "Vous ne pouvez pas vous inscrire à un dossier qui vous appartient!";
|
||||
"Unable to subscribe to that folder!"
|
||||
= "Impossible de vous inscrire à ce dossier!";
|
||||
|
||||
"Default Roles" = "Rôles par défaut";
|
||||
"User rights for:" = "Autorisations pour :";
|
||||
"Default Roles" = "Standard-Rollen";
|
||||
"User rights for:" = "Benutzerrechte für:";
|
||||
|
||||
"This person can add cards to this addressbook."
|
||||
= "Cette personne peut ajouter des fiches à ce carnet d'adresses.";
|
||||
= "Diese Person kann neue Karten zu diesem Adressbuch hinzufügen.";
|
||||
"This person can edit the cards of this addressbook."
|
||||
= "Cette personne peut éditer des fiches de ce carnet d'adresses.";
|
||||
= "Diese Person kann in diesem Adressbuch bestehende Karten verändern.";
|
||||
"This person can list the content of this addressbook."
|
||||
= "Cette personne peut lister le contenu de ce carnet d'adresses.";
|
||||
= "Diese Person kann die Liste der Karten dieses Adressbuches anzeigen.";
|
||||
"This person can read the cards of this addressbook."
|
||||
= "Cette personne peut visionner les fiches de ce carnet d'adresses.";
|
||||
= "Diese Person kann Karten dieses Adressbuches anzeigen.";
|
||||
"This person can erase cards from this addressbook."
|
||||
= "Cette personne peut effacer des fiches de ce carnet d'adresses.";
|
||||
= "Diese Person kann Karten aus diesem Adressbuch löschen";
|
||||
|
||||
"The selected contact has no email address."
|
||||
= "The selected contact has no email address.";
|
||||
|
||||
@@ -4,26 +4,31 @@
|
||||
jsLink="js_card";
|
||||
label="New Card";
|
||||
image="new-card.png";
|
||||
onclick = "newContact(this); return false;"; },
|
||||
onclick = "newContact(this); return false;";
|
||||
tooltip = "Create a new address book card"; },
|
||||
{ link = "new_list";
|
||||
enabled = "NO";
|
||||
label="New List";
|
||||
image="new-list.png"; }
|
||||
image="new-list.png";
|
||||
tooltip = "Create a new list"; }
|
||||
),
|
||||
(
|
||||
{ link = "edit";
|
||||
label = "Modify";
|
||||
onclick = "return onToolbarEditSelectedContacts(this);";
|
||||
image = "properties.png"; },
|
||||
image = "properties.png";
|
||||
tooltip = "Edit the selected card"; },
|
||||
{ link = "write";
|
||||
label="Write";
|
||||
onclick = "return onToolbarWriteToSelectedContacts(this);";
|
||||
image="write.png"; }
|
||||
image="write.png";
|
||||
tooltip = "Send a mail message"; }
|
||||
),
|
||||
(
|
||||
{ link = "delete";
|
||||
label="Delete";
|
||||
onclick = "return uixDeleteSelectedContacts(this);";
|
||||
image="delete.png"; }
|
||||
image="delete.png";
|
||||
tooltip = "Delete selected card or address book"; }
|
||||
)
|
||||
)
|
||||
|
||||
@@ -584,8 +584,8 @@
|
||||
id <SOGoContactFolder> co;
|
||||
|
||||
co = [self clientObject];
|
||||
if ([[co class] respondsToSelector: @selector (globallyUniqueObjectId)])
|
||||
objectId = [[[self clientObject] class] globallyUniqueObjectId];
|
||||
if ([co respondsToSelector: @selector (globallyUniqueObjectId)])
|
||||
objectId = [co globallyUniqueObjectId];
|
||||
else
|
||||
objectId = nil;
|
||||
|
||||
|
||||
@@ -52,9 +52,7 @@
|
||||
WORequest *request;
|
||||
|
||||
folders = [self clientObject];
|
||||
action = [NSString stringWithFormat: @"../%@/%@",
|
||||
[folders defaultSourceName],
|
||||
actionName];
|
||||
action = [NSString stringWithFormat: @"../personal/%@", actionName];
|
||||
|
||||
request = [[self context] request];
|
||||
|
||||
@@ -75,21 +73,6 @@
|
||||
return [self _selectActionForApplication: @"new"];
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) newAbAction
|
||||
{
|
||||
id <WOActionResults> response;
|
||||
NSString *name;
|
||||
|
||||
name = [self queryParameterForKey: @"name"];
|
||||
if ([name length] > 0)
|
||||
response = [[self clientObject] newFolderWithName: name];
|
||||
else
|
||||
response = [NSException exceptionWithHTTPStatus: 400
|
||||
reason: @"The name is missing"];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (id) selectForMailerAction
|
||||
{
|
||||
return [self _selectActionForApplication: @"mailer-contacts"];
|
||||
@@ -111,8 +94,7 @@
|
||||
{
|
||||
uid = [currentContact objectForKey: @"c_uid"];
|
||||
if (uid && ![results objectForKey: uid])
|
||||
[results setObject: currentContact
|
||||
forKey: uid];
|
||||
[results setObject: currentContact forKey: uid];
|
||||
currentContact = [folderResults nextObject];
|
||||
}
|
||||
}
|
||||
@@ -139,25 +121,29 @@
|
||||
{
|
||||
WOResponse *response;
|
||||
NSEnumerator *contacts;
|
||||
NSString *responseString;
|
||||
NSString *responseString, *email;
|
||||
NSDictionary *contact;
|
||||
|
||||
response = [context response];
|
||||
|
||||
if ([results count] > 0)
|
||||
{
|
||||
[response setStatus: 200];
|
||||
contacts = [results objectEnumerator];
|
||||
contact = [contacts nextObject];
|
||||
if (contact)
|
||||
{
|
||||
responseString = [NSString stringWithFormat: @"%@:%@:%@",
|
||||
[contact objectForKey: @"c_uid"],
|
||||
[contact objectForKey: @"cn"],
|
||||
[contact objectForKey: @"c_email"]];
|
||||
[response setStatus: 200];
|
||||
email = [contact objectForKey: @"c_email"];
|
||||
if ([email length])
|
||||
{
|
||||
responseString = [NSString stringWithFormat: @"%@:%@:%@",
|
||||
[contact objectForKey: @"c_uid"],
|
||||
[contact objectForKey: @"cn"],
|
||||
email];
|
||||
// [response setHeader: @"text/plain; charset=iso-8859-1"
|
||||
// forKey: @"Content-Type"];
|
||||
[response appendContentString: responseString];
|
||||
[response appendContentString: responseString];
|
||||
}
|
||||
// contact = [contacts nextObject];
|
||||
}
|
||||
}
|
||||
@@ -187,50 +173,55 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSArray *) _gcsFoldersFromFolder: (SOGoContactFolders *) contactFolders
|
||||
- (NSArray *) _subFoldersFromFolder: (SOGoParentFolder *) parentFolder
|
||||
{
|
||||
NSMutableArray *gcsFolders;
|
||||
NSEnumerator *contactSubfolders;
|
||||
SOGoContactGCSFolder *currentContactFolder;
|
||||
NSString *folderName, *displayName;
|
||||
NSMutableArray *folders;
|
||||
NSEnumerator *subfolders;
|
||||
SOGoFolder *currentFolder;
|
||||
NSString *folderName;
|
||||
NSMutableDictionary *currentDictionary;
|
||||
SoSecurityManager *securityManager;
|
||||
|
||||
gcsFolders = [NSMutableArray new];
|
||||
[gcsFolders autorelease];
|
||||
securityManager = [SoSecurityManager sharedSecurityManager];
|
||||
|
||||
// return (([securityManager validatePermission: SoPerm_AccessContentsInformation
|
||||
// onObject: contactFolder
|
||||
// inContext: context] == nil)
|
||||
|
||||
contactSubfolders = [[contactFolders contactFolders] objectEnumerator];
|
||||
currentContactFolder = [contactSubfolders nextObject];
|
||||
while (currentContactFolder)
|
||||
folders = [NSMutableArray new];
|
||||
[folders autorelease];
|
||||
|
||||
subfolders = [[parentFolder subFolders] objectEnumerator];
|
||||
currentFolder = [subfolders nextObject];
|
||||
while (currentFolder)
|
||||
{
|
||||
if ([currentContactFolder
|
||||
isKindOfClass: [SOGoContactGCSFolder class]])
|
||||
if (![securityManager validatePermission: SOGoPerm_AccessObject
|
||||
onObject: currentFolder inContext: context])
|
||||
{
|
||||
displayName = [[currentContactFolder ocsFolder] folderName];
|
||||
if (displayName)
|
||||
{
|
||||
folderName = [NSString stringWithFormat: @"/Contacts/%@",
|
||||
[currentContactFolder nameInContainer]];
|
||||
currentDictionary
|
||||
= [NSMutableDictionary dictionaryWithCapacity: 3];
|
||||
[currentDictionary setObject: displayName forKey: @"displayName"];
|
||||
[currentDictionary setObject: folderName forKey: @"name"];
|
||||
[currentDictionary setObject: @"contact" forKey: @"type"];
|
||||
[gcsFolders addObject: currentDictionary];
|
||||
}
|
||||
folderName = [NSString stringWithFormat: @"/%@/%@",
|
||||
[parentFolder nameInContainer],
|
||||
[currentFolder nameInContainer]];
|
||||
currentDictionary
|
||||
= [NSMutableDictionary dictionaryWithCapacity: 3];
|
||||
[currentDictionary setObject: [currentFolder displayName]
|
||||
forKey: @"displayName"];
|
||||
[currentDictionary setObject: folderName forKey: @"name"];
|
||||
[currentDictionary setObject: [currentFolder folderType]
|
||||
forKey: @"type"];
|
||||
[folders addObject: currentDictionary];
|
||||
}
|
||||
currentContactFolder = [contactSubfolders nextObject];
|
||||
currentFolder = [subfolders nextObject];
|
||||
}
|
||||
|
||||
return gcsFolders;
|
||||
return folders;
|
||||
}
|
||||
|
||||
- (NSArray *) _foldersForUID: (NSString *) uid
|
||||
ofType: (NSString *) folderType
|
||||
{
|
||||
NSObject *topFolder, *userFolder;
|
||||
SOGoContactFolders *contactFolders;
|
||||
SOGoParentFolder *parentFolder;
|
||||
NSMutableArray *folders;
|
||||
NSMutableDictionary *currentDictionary;
|
||||
|
||||
folders = [NSMutableArray new];
|
||||
[folders autorelease];
|
||||
@@ -239,23 +230,19 @@
|
||||
userFolder = [topFolder lookupName: uid inContext: context acquire: NO];
|
||||
|
||||
/* FIXME: should be moved in the SOGo* classes. Maybe by having a SOGoFolderManager. */
|
||||
#warning this might need adjustments whenever we permit multiple calendar folders per-user
|
||||
if ([folderType length] == 0 || [folderType isEqualToString: @"calendar"])
|
||||
{
|
||||
currentDictionary = [NSMutableDictionary new];
|
||||
[currentDictionary autorelease];
|
||||
[currentDictionary setObject: [self labelForKey: @"Calendar"]
|
||||
forKey: @"displayName"];
|
||||
[currentDictionary setObject: @"/Calendar" forKey: @"name"];
|
||||
[currentDictionary setObject: @"calendar" forKey: @"type"];
|
||||
[folders addObject: currentDictionary];
|
||||
parentFolder = [userFolder lookupName: @"Calendar"
|
||||
inContext: context acquire: NO];
|
||||
[folders
|
||||
addObjectsFromArray: [self _subFoldersFromFolder: parentFolder]];
|
||||
}
|
||||
if ([folderType length] == 0 || [folderType isEqualToString: @"contact"])
|
||||
{
|
||||
contactFolders = [userFolder lookupName: @"Contacts"
|
||||
inContext: context acquire: NO];
|
||||
parentFolder = [userFolder lookupName: @"Contacts"
|
||||
inContext: context acquire: NO];
|
||||
[folders
|
||||
addObjectsFromArray: [self _gcsFoldersFromFolder: contactFolders]];
|
||||
addObjectsFromArray: [self _subFoldersFromFolder: parentFolder]];
|
||||
}
|
||||
|
||||
return folders;
|
||||
@@ -346,31 +333,30 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- (SOGoContactGCSFolder *) contactFolderForUID: (NSString *) uid
|
||||
{
|
||||
SOGoFolder *upperContainer;
|
||||
SOGoUserFolder *userFolder;
|
||||
SOGoContactFolders *contactFolders;
|
||||
SOGoContactGCSFolder *contactFolder;
|
||||
SoSecurityManager *securityManager;
|
||||
// - (SOGoContactGCSFolder *) contactFolderForUID: (NSString *) uid
|
||||
// {
|
||||
// SOGoFolder *upperContainer;
|
||||
// SOGoUserFolder *userFolder;
|
||||
// SOGoContactFolders *contactFolders;
|
||||
// SOGoContactGCSFolder *contactFolder;
|
||||
// SoSecurityManager *securityManager;
|
||||
|
||||
upperContainer = [[[self clientObject] container] container];
|
||||
userFolder = [SOGoUserFolder objectWithName: uid
|
||||
inContainer: upperContainer];
|
||||
contactFolders = [SOGoContactFolders objectWithName: @"Contacts"
|
||||
inContainer: userFolder];
|
||||
contactFolder = [SOGoContactGCSFolder objectWithName: @"personal"
|
||||
inContainer: contactFolders];
|
||||
[contactFolder
|
||||
setOCSPath: [NSString stringWithFormat: @"/Users/%@/Contacts/personal", uid]];
|
||||
[contactFolder setOwner: uid];
|
||||
// upperContainer = [[[self clientObject] container] container];
|
||||
// userFolder = [SOGoUserFolder objectWithName: uid
|
||||
// inContainer: upperContainer];
|
||||
// contactFolders = [SOGoUserFolder lookupName: @"Contacts"
|
||||
// inContext: context
|
||||
// acquire: NO];
|
||||
// contactFolder = [contactFolders lookupName: @"personal"
|
||||
// inContext: context
|
||||
// acquire: NO];
|
||||
|
||||
securityManager = [SoSecurityManager sharedSecurityManager];
|
||||
// securityManager = [SoSecurityManager sharedSecurityManager];
|
||||
|
||||
return (([securityManager validatePermission: SoPerm_AccessContentsInformation
|
||||
onObject: contactFolder
|
||||
inContext: context] == nil)
|
||||
? contactFolder : nil);
|
||||
}
|
||||
// return (([securityManager validatePermission: SoPerm_AccessContentsInformation
|
||||
// onObject: contactFolder
|
||||
// inContext: context] == nil)
|
||||
// ? contactFolder : nil);
|
||||
// }
|
||||
|
||||
@end
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
{
|
||||
url = [[elements objectAtIndex: 0] value: 0];
|
||||
data = [NSString stringWithFormat:
|
||||
@"<a href=\"%@\">%@</a>",
|
||||
@"<a href=\"%@\" target=\"_blank\">%@</a>",
|
||||
url, url];
|
||||
}
|
||||
else
|
||||
|
||||
@@ -81,25 +81,6 @@
|
||||
return selectorComponentClass;
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) deleteAction
|
||||
{
|
||||
id <WOActionResults> result;
|
||||
NSException <WOActionResults> *ex;
|
||||
WOResponse *response;
|
||||
|
||||
ex = [[self clientObject] delete];
|
||||
if (ex)
|
||||
result = ex;
|
||||
else
|
||||
{
|
||||
response = [context response];
|
||||
[response setStatus: 200];
|
||||
result = response;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSString *) defaultSortKey
|
||||
{
|
||||
return @"displayName";
|
||||
|
||||
@@ -31,28 +31,18 @@
|
||||
|
||||
@interface UIxContactsListViewContainer : UIxComponent
|
||||
{
|
||||
NSString *foldersPrefix;
|
||||
NSString *selectorComponentClass;
|
||||
NSString *currentAdditionalFolder;
|
||||
NSDictionary *additionalFolders;
|
||||
id currentFolder;
|
||||
}
|
||||
|
||||
- (void) setCurrentFolder: (id) folder;
|
||||
|
||||
- (NSString *) foldersPrefix;
|
||||
|
||||
- (NSArray *) contactFolders;
|
||||
|
||||
- (NSString *) currentContactFolderId;
|
||||
- (NSString *) currentContactFolderOwner;
|
||||
- (NSString *) currentContactFolderName;
|
||||
|
||||
- (NSArray *) additionalFolders;
|
||||
|
||||
- (void) setCurrentAdditionalFolder: (NSString *) newCurrentAdditionalFolder;
|
||||
- (NSString *) currentAdditionalFolder;
|
||||
- (NSString *) currentAdditionalFolderName;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXCONTACTSLISTVIEWCONTAINERBASE_H */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/Contacts/SOGoContactFolder.h>
|
||||
#import <SoObjects/Contacts/SOGoContactFolders.h>
|
||||
|
||||
#import "UIxContactsListViewContainer.h"
|
||||
|
||||
@@ -40,20 +41,12 @@
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
foldersPrefix = nil;
|
||||
selectorComponentClass = nil;
|
||||
additionalFolders = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[additionalFolders release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setSelectorComponentClass: (NSString *) aComponentClass
|
||||
{
|
||||
selectorComponentClass = aComponentClass;
|
||||
@@ -85,43 +78,18 @@
|
||||
currentFolder = folder;
|
||||
}
|
||||
|
||||
- (NSString *) foldersPrefix
|
||||
{
|
||||
NSMutableArray *folders;
|
||||
SOGoObject *currentObject;
|
||||
|
||||
if (!foldersPrefix)
|
||||
{
|
||||
folders = [NSMutableArray new];
|
||||
[folders autorelease];
|
||||
|
||||
currentObject = [[self clientObject] container];
|
||||
while (![currentObject isKindOfClass: [SOGoContactFolders class]])
|
||||
{
|
||||
[folders insertObject: [currentObject nameInContainer] atIndex: 0];
|
||||
currentObject = [currentObject container];
|
||||
}
|
||||
|
||||
foldersPrefix = [folders componentsJoinedByString: @"/"];
|
||||
[foldersPrefix retain];
|
||||
}
|
||||
|
||||
return foldersPrefix;
|
||||
}
|
||||
|
||||
- (NSArray *) contactFolders
|
||||
{
|
||||
SOGoContactFolders *folderContainer;
|
||||
|
||||
folderContainer = [[self clientObject] container];
|
||||
|
||||
return [folderContainer contactFolders];
|
||||
return [folderContainer subFolders];
|
||||
}
|
||||
|
||||
- (NSString *) currentContactFolderId
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@/%@",
|
||||
[self foldersPrefix],
|
||||
return [NSString stringWithFormat: @"/%@",
|
||||
[currentFolder nameInContainer]];
|
||||
}
|
||||
|
||||
@@ -130,35 +98,9 @@
|
||||
return [currentFolder displayName];
|
||||
}
|
||||
|
||||
- (NSArray *) additionalFolders
|
||||
- (NSString *) currentContactFolderOwner
|
||||
{
|
||||
NSUserDefaults *ud;
|
||||
|
||||
if (!additionalFolders)
|
||||
{
|
||||
ud = [[context activeUser] userSettings];
|
||||
additionalFolders
|
||||
= [[ud objectForKey: @"Contacts"] objectForKey: @"SubscribedFolders"];
|
||||
[additionalFolders retain];
|
||||
}
|
||||
|
||||
return [additionalFolders allKeys];
|
||||
}
|
||||
|
||||
- (void) setCurrentAdditionalFolder: (NSString *) newCurrentAdditionalFolder
|
||||
{
|
||||
currentAdditionalFolder = newCurrentAdditionalFolder;
|
||||
}
|
||||
|
||||
- (NSString *) currentAdditionalFolder
|
||||
{
|
||||
return currentAdditionalFolder;
|
||||
}
|
||||
|
||||
- (NSString *) currentAdditionalFolderName
|
||||
{
|
||||
return [[additionalFolders objectForKey: currentAdditionalFolder]
|
||||
objectForKey: @"displayName"];
|
||||
return [currentFolder ownerInContext: context];
|
||||
}
|
||||
|
||||
- (BOOL) hasContactSelectionButtons
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
pageName = "UIxContactFoldersView";
|
||||
actionName = "new";
|
||||
};
|
||||
newAb = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactFoldersView";
|
||||
actionName = "newAb";
|
||||
};
|
||||
mailer-contacts = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactFoldersView";
|
||||
@@ -87,11 +82,6 @@
|
||||
pageName = "UIxContactsListView";
|
||||
actionName = "mailerContacts";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "SaveAcls"; /* a hack to force "owner" */
|
||||
pageName = "UIxContactsListView";
|
||||
actionName = "delete";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxContactsUserRightsEditor";
|
||||
|
||||
@@ -40,6 +40,9 @@ MailPartViewers_LOCALIZED_RESOURCE_FILES += \
|
||||
|
||||
# make
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/sope-gdl1/
|
||||
ADDITIONAL_LIB_DIRS += -L../../SOPE/sope-gdl1/GDLContentStore/obj/
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
#import "UIxMailPartViewer.h"
|
||||
|
||||
@interface UIxMailPartHTMLViewer : UIxMailPartViewer
|
||||
{
|
||||
id handler;
|
||||
}
|
||||
|
||||
- (NSString *) flatContentAsString;
|
||||
|
||||
|
||||
@@ -72,12 +72,9 @@
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (crumb)
|
||||
[crumb release];
|
||||
if (result)
|
||||
[result release];
|
||||
if (css)
|
||||
[css release];
|
||||
[crumb release];
|
||||
[result release];
|
||||
[css release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -88,12 +85,12 @@
|
||||
|
||||
- (NSString *) css
|
||||
{
|
||||
return [[css copy] autorelease];
|
||||
return css;
|
||||
}
|
||||
|
||||
- (NSString *) result
|
||||
{
|
||||
return [[result copy] autorelease];
|
||||
return result;
|
||||
}
|
||||
|
||||
/* SaxContentHandler */
|
||||
@@ -101,16 +98,14 @@
|
||||
{
|
||||
showWhoWeAre();
|
||||
|
||||
if (crumb)
|
||||
[crumb release];
|
||||
if (result)
|
||||
[result release];
|
||||
if (css)
|
||||
[css release];
|
||||
[crumb release];
|
||||
[css release];
|
||||
[result release];
|
||||
|
||||
result = [NSMutableString new];
|
||||
css = [NSMutableString new];
|
||||
crumb = [NSMutableArray new];
|
||||
|
||||
inBody = NO;
|
||||
inStyle = NO;
|
||||
inScript = NO;
|
||||
@@ -245,6 +240,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void) _finishCSS
|
||||
{
|
||||
[css replaceString: @".SOGoHTMLMail-CSS-Delimiter body"
|
||||
withString: @".SOGoHTMLMail-CSS-Delimiter"];
|
||||
[css replaceString: @";" withString: @" !important;"];
|
||||
[css replaceString: @"<!--" withString: @""];
|
||||
[css replaceString: @"-->" withString: @""];
|
||||
}
|
||||
|
||||
- (void) endElement: (NSString *) _localName
|
||||
namespace: (NSString *) _ns
|
||||
rawName: (NSString *) _rawName
|
||||
@@ -264,7 +268,11 @@
|
||||
else if (inBody)
|
||||
{
|
||||
if ([_localName caseInsensitiveCompare: @"body"] == NSOrderedSame)
|
||||
inBody = NO;
|
||||
{
|
||||
inBody = NO;
|
||||
if (css)
|
||||
[self _finishCSS];
|
||||
}
|
||||
else
|
||||
[result appendFormat: @"</%@>", _localName];
|
||||
}
|
||||
@@ -280,7 +288,7 @@
|
||||
{
|
||||
if (inStyle)
|
||||
[self _appendStyle: _chars length: _len];
|
||||
if (inBody)
|
||||
else if (inBody)
|
||||
{
|
||||
tmpString = [NSString stringWithCharacters: _chars length: _len];
|
||||
[result appendString: [tmpString stringByEscapingHTMLString]];
|
||||
@@ -386,6 +394,22 @@
|
||||
|
||||
@implementation UIxMailPartHTMLViewer
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
handler = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[handler release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) _convertReferencesForPart: (NSDictionary *) part
|
||||
withCount: (unsigned int) count
|
||||
andBaseURL: (NSString *) url
|
||||
@@ -439,16 +463,11 @@
|
||||
return attachmentIds;
|
||||
}
|
||||
|
||||
- (NSString *) flatContentAsString
|
||||
- (void) _parseContent
|
||||
{
|
||||
id <NSObject, SaxXMLReader> parser;
|
||||
_UIxHTMLMailContentHandler *handler;
|
||||
NSString *css;
|
||||
NSMutableString *content;
|
||||
NSData *preparsedContent;
|
||||
|
||||
content = [NSMutableString string];
|
||||
|
||||
preparsedContent = [super decodedFlatContent];
|
||||
parser = [[SaxXMLReaderFactory standardXMLReaderFactory]
|
||||
createXMLReaderForMimeType: @"text/html"];
|
||||
@@ -457,14 +476,31 @@
|
||||
[handler setAttachmentIds: [self _attachmentIds]];
|
||||
[parser setContentHandler: handler];
|
||||
[parser parseFromSource: preparsedContent];
|
||||
}
|
||||
|
||||
- (NSString *) cssContent
|
||||
{
|
||||
NSString *cssContent, *css;
|
||||
|
||||
if (!handler)
|
||||
[self _parseContent];
|
||||
|
||||
css = [handler css];
|
||||
if ([css length])
|
||||
[content appendFormat: @"<style type=\"text/css\">%@</style>", css];
|
||||
[content appendString: [handler result]];
|
||||
[handler release];
|
||||
cssContent = [NSString stringWithFormat: @"<style type=\"text/css\">%@</style>",
|
||||
[handler css]];
|
||||
else
|
||||
cssContent = @"";
|
||||
|
||||
return content;
|
||||
return cssContent;
|
||||
}
|
||||
|
||||
- (NSString *) flatContentAsString
|
||||
{
|
||||
if (!handler)
|
||||
[self _parseContent];
|
||||
|
||||
return [handler result];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -195,7 +195,8 @@
|
||||
|
||||
/* calendar folder support */
|
||||
|
||||
- (id)calendarFolder {
|
||||
- (id) calendarFolder
|
||||
{
|
||||
/* return scheduling calendar of currently logged-in user */
|
||||
SOGoUser *user;
|
||||
id folder;
|
||||
@@ -205,7 +206,7 @@
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
|
||||
return folder;
|
||||
return [folder lookupName: @"personal" inContext: context acquire: NO];
|
||||
}
|
||||
|
||||
- (id)storedEventObject {
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
content = [NSMutableString string];
|
||||
superContent = [[super flatContentAsString] stringByEscapingHTMLString];
|
||||
[content appendString: [superContent stringByDetectingURLs]];
|
||||
[content replaceString: @"\r\n" withString: @"<br />"];
|
||||
[content replaceString: @"\n" withString: @"<br />"];
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,8 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSString *)flatContentAsString {
|
||||
- (NSString *) flatContentAsString
|
||||
{
|
||||
/* Note: we even have the line count in the body-info! */
|
||||
NSString *charset;
|
||||
NSString *s;
|
||||
@@ -175,18 +176,27 @@
|
||||
{
|
||||
charset = [[bodyInfo objectForKey:@"parameterList"]
|
||||
objectForKey: @"charset"];
|
||||
|
||||
// TODO: properly decode charset, might need to handle encoding?
|
||||
|
||||
if ([charset length] > 0)
|
||||
s = [NSString stringWithData: content
|
||||
usingEncodingNamed: [charset lowercaseString]];
|
||||
else
|
||||
charset = [charset lowercaseString];
|
||||
if (![charset length]
|
||||
|| [charset isEqualToString: @"us-ascii"])
|
||||
{
|
||||
s = [[NSString alloc] initWithData: content
|
||||
encoding: NSUTF8StringEncoding];
|
||||
encoding: NSISOLatin1StringEncoding];
|
||||
[s autorelease];
|
||||
}
|
||||
else
|
||||
{
|
||||
s = [NSString stringWithData: content
|
||||
usingEncodingNamed: charset];
|
||||
if (![s length])
|
||||
{
|
||||
/* latin 1 is used as a 8bit fallback charset... but does this
|
||||
encoding accept any byte from 0 to 255? */
|
||||
s = [[NSString alloc] initWithData: content
|
||||
encoding: NSISOLatin1StringEncoding];
|
||||
[s autorelease];
|
||||
}
|
||||
}
|
||||
|
||||
if (!s)
|
||||
{
|
||||
@@ -302,7 +312,7 @@
|
||||
- (NSString *) pathToAttachmentObject
|
||||
{
|
||||
/* this points to the SoObject representing the part, no modifications */
|
||||
NSString *url, *n, *pext;
|
||||
NSString *url, *n;
|
||||
|
||||
/* path to mail controller object */
|
||||
|
||||
|
||||
@@ -19,11 +19,28 @@
|
||||
"Attach" = "Attach";
|
||||
"Save" = "Save";
|
||||
|
||||
/* Tooltips */
|
||||
|
||||
"Send this message now" = "Send this message now";
|
||||
"Select a recipient from an Address Book" = "Select a recipient from an Address Book";
|
||||
"Include an attachment" = "Include an attachment";
|
||||
"Save this message" = "Save this message";
|
||||
"Get new messages" = "Get new messages";
|
||||
"Create a new message" = "Create a new message";
|
||||
"Go to address book" = "Go to address book";
|
||||
"Reply to the message" = "Reply to the message";
|
||||
"Reply to sender and all recipients" = "Reply to sender and all recipients";
|
||||
"Forward selected message" = "Forward selected message";
|
||||
"Delete selected message or folder" = "Delete selected message or folder";
|
||||
"Mark the selected messages as junk" = "Mark the selected messages as junk";
|
||||
"Print this message" = "Print this message";
|
||||
"Stop the current transfer" = "Stop the current transfer";
|
||||
|
||||
/* Main Frame */
|
||||
|
||||
"Home" = "Home";
|
||||
"Calendar" = "Calendar";
|
||||
"Addressbook" = "Addressbook";
|
||||
"Addressbook" = "Address Book";
|
||||
"Mail" = "Mail";
|
||||
"Right Administration" = "Right Administration";
|
||||
|
||||
@@ -71,7 +88,7 @@
|
||||
"cc" = "Cc";
|
||||
"bcc" = "Bcc";
|
||||
|
||||
"Addressbook" = "Addressbook";
|
||||
"Addressbook" = "Address Book";
|
||||
"Anais" = "Anais";
|
||||
|
||||
"Edit Draft..." = "Edit Draft...";
|
||||
@@ -122,9 +139,66 @@
|
||||
|
||||
"MoveTo" = "Move …";
|
||||
|
||||
"error_missingsubject" = "Missing Subject";
|
||||
"error_missingrecipients" = "Missing Recipients";
|
||||
"error_validationfailed" = "Validation failed";
|
||||
/* Address Popup menu */
|
||||
"Add to Address Book..." = "Add to Address Book...";
|
||||
"Compose Mail To" = "Compose Mail To";
|
||||
"Create Filter From Message..." = "Create Filter From Message...";
|
||||
|
||||
/* Mailbox popup menus */
|
||||
"Open in New Mail Window" = "Open in New Mail Window";
|
||||
"Copy Folder Location" = "Copy Folder Location";
|
||||
"Subscribe..." = "Subscribe...";
|
||||
"Mark Folder Read..." = "Mark Folder Read...";
|
||||
"New Folder..." = "New Folder...";
|
||||
"Compact This Folder" = "Compact This Folder";
|
||||
"Search Messages..." = "Search Messages...";
|
||||
"Sharing..." = "Sharing...";
|
||||
"New Subfolder..." = "New Subfolder...";
|
||||
"Rename Folder..." = "Rename Folder...";
|
||||
"Delete Folder" = "Delete Folder";
|
||||
"Use This Folder For" = "Use This Folder For";
|
||||
"Get Messages for Account" = "Get Messages for Account";
|
||||
|
||||
/* Use This Folder menu */
|
||||
"Sent Messages" = "Sent Messages";
|
||||
"Drafts" = "Drafts";
|
||||
"Deleted Messages" = "Deleted Messages";
|
||||
|
||||
/* Message list popup menu */
|
||||
"Open Message In New Window" = "Open Message In New Window";
|
||||
"Reply to Sender Only" = "Reply to Sender Only";
|
||||
"Reply to All" = "Reply to All";
|
||||
"Forward" = "Forward";
|
||||
"Edit As New..." = "Edit As New...";
|
||||
"Move To" = "Move To";
|
||||
"Copy To" = "Copy To";
|
||||
"Label" = "Label";
|
||||
"Mark" = "Mark";
|
||||
"Save As..." = "Save As...";
|
||||
"Print Preview" = "Print Preview";
|
||||
"View Message Source" = "View Message Source";
|
||||
"Print..." = "Print...";
|
||||
"Delete Message" = "Delete Message";
|
||||
|
||||
"This Folder" = "This Folder";
|
||||
|
||||
/* Label popup menu */
|
||||
"None" = "None";
|
||||
"Important" = "Important";
|
||||
"Work" = "Work";
|
||||
"Personal" = "Personal";
|
||||
"To Do" = "To Do";
|
||||
"Later" = "Later";
|
||||
|
||||
/* Mark popup menu */
|
||||
"As Read" = "As Read";
|
||||
"Thread As Read" = "Thread As Read";
|
||||
"As Read By Date..." = "As Read By Date...";
|
||||
"All Read" = "All Read";
|
||||
"Flag" = "Flag";
|
||||
"As Junk" = "As Junk";
|
||||
"As Not Junk" = "As Not Junk";
|
||||
"Run Junk Mail Controls" = "Run Junk Mail Controls";
|
||||
|
||||
/* Folder operations */
|
||||
"Name :" = "Name :";
|
||||
@@ -136,5 +210,14 @@
|
||||
|
||||
"quotasFormat" = "Quotas: %{0} used on %{1} Kb; %{2}%";
|
||||
|
||||
"Please select a message." = "Please select a message.";
|
||||
"Please select a message to print." = "Please select a message to print.";
|
||||
"Please select only one message to print." = "Please select only one message to print.";
|
||||
|
||||
"You need to choose a non-virtual folder!" = "You need to choose a non-virtual folder!";
|
||||
"You need to choose a root subfolder!" = "You need to choose a root subfolder!";
|
||||
|
||||
"Moving a message into its own folder is impossible!"
|
||||
= "Moving a message into its own folder is impossible!";
|
||||
"Copying a message into its own folder is impossible!"
|
||||
= "Copying a message into its own folder is impossible!";
|
||||
|
||||
@@ -19,6 +19,23 @@
|
||||
"Attach" = "Joindre";
|
||||
"Save" = "Enregistrer";
|
||||
|
||||
/* Tooltips */
|
||||
|
||||
"Send this message now" = "Envoyer le message maintenant";
|
||||
"Select a recipient from an Address Book" = "Sélectionner un destinataire du carnet d'adresses";
|
||||
"Include an attachment" = "Inclure une pièce jointe";
|
||||
"Save this message" = "Enregistrer ce message";
|
||||
"Get new messages" = "Relever les nouveaux messages";
|
||||
"Create a new message" = "Créer un nouveau message";
|
||||
"Go to address book" = "Ouvrir le carnet d'adresses";
|
||||
"Reply to the message" = "Répondre au message";
|
||||
"Reply to sender and all recipients" = "Répondre à l'expéditeur et à tous les destinataires";
|
||||
"Forward selected message" = "Transférer le message sélectionné";
|
||||
"Delete selected message or folder" = "Supprimer le message ou le dossier sélectionné";
|
||||
"Mark the selected messages as junk" = "Marquer les messages sélectionnés comme indésirables";
|
||||
"Print this message" = "Imprimer ce message";
|
||||
"Stop the current transfer" = "Arrêter le transfert courant";
|
||||
|
||||
/* Main Frame */
|
||||
|
||||
"Home" = "Accueil";
|
||||
@@ -140,8 +157,14 @@
|
||||
"New Subfolder..." = "Nouveau sous-dossier...";
|
||||
"Rename Folder..." = "Renommer le dossier...";
|
||||
"Delete Folder" = "Supprimer le dossier...";
|
||||
"Use This Folder For" = "Utiliser ce dossier pour";
|
||||
"Get Messages for Account" = "Relever les messages de ce compte";
|
||||
|
||||
/* Use This Folder menu */
|
||||
"Sent Messages" = "les message envoyés";
|
||||
"Drafts" = "les brouillons";
|
||||
"Deleted Messages" = "les message effacés";
|
||||
|
||||
/* Message list popup menu */
|
||||
"Open Message In New Window" = "Ouvrir dans une nouvelle fenétre";
|
||||
"Reply to Sender Only" = "Répondre à l'expéditeur";
|
||||
@@ -158,6 +181,8 @@
|
||||
"Print..." = "Imprimer...";
|
||||
"Delete Message" = "Supprimer le message";
|
||||
|
||||
"This Folder" = "Ce dossier-ci";
|
||||
|
||||
/* Label popup menu */
|
||||
"None" = "Aucune";
|
||||
"Important" = "Important";
|
||||
@@ -186,5 +211,14 @@
|
||||
|
||||
"quotasFormat" = "Quotas: %{0} Ko utilisés sur %{1}; %{2}%";
|
||||
|
||||
"Please select a message." = "Veuillez sélectionner un message.";
|
||||
"Please select a message to print." = "Veuillez sélectionner un message à imprimer.";
|
||||
"Please select only one message to print." = "Veuillez ne sélectionner qu'un seul message à imprimer.";
|
||||
|
||||
"You need to choose a non-virtual folder!" = "Vous devez choisir un dossier non-virtuel.";
|
||||
"You need to choose a root subfolder!" = "Vous devez choisir un sous-dossier de la racine.";
|
||||
|
||||
"Moving a message into its own folder is impossible!"
|
||||
= "Le déplacement d'un message dans son propre dossier est impossible.";
|
||||
"Copying a message into its own folder is impossible!"
|
||||
= "La copie d'un message dans son propre dossier est impossible.";
|
||||
|
||||
@@ -50,6 +50,9 @@ MailerUI_LOCALIZED_RESOURCE_FILES += \
|
||||
|
||||
# make
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/sope-gdl1/
|
||||
ADDITIONAL_LIB_DIRS += -L../../SOPE/sope-gdl1/GDLContentStore/obj/
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
"Stop" = "Stopp";
|
||||
"Write" = "Verfassen";
|
||||
|
||||
"Send" = "Senden"
|
||||
"Contacts" = "Kontakte"
|
||||
"Send" = "Senden";
|
||||
"Contacts" = "Kontakte";
|
||||
"Attach" = "Anhang";
|
||||
"Save" = "Speichern"
|
||||
"Save" = "Speichern";
|
||||
|
||||
/* Main Frame */
|
||||
|
||||
@@ -35,27 +35,27 @@
|
||||
"Read messages" = "Lire les messages";
|
||||
"Write a new message" = "Eine neue Nachricht schreiben";
|
||||
|
||||
"Share: " = "Partage : ";
|
||||
"Share: " = "Benutzerrechte: ";
|
||||
"Account: " = "Konto: ";
|
||||
"Shared Account: " = "Compte Partagé ";
|
||||
|
||||
/* acls */
|
||||
"Default Roles" = "Rôles par défaut";
|
||||
"User rights for:" = "Autorisations pour:";
|
||||
"Default Roles" = "Standard-Rollen";
|
||||
"User rights for:" = "Benutzerrechte für:";
|
||||
|
||||
"List and see this folder" = "Lister et voir ce dossier";
|
||||
"Read mails from this folder" = "Lire les messages de ce dossier";
|
||||
"Mark mails read and unread" = "Marquer les messages comme lus ou non-lus";
|
||||
"Modify the flags of the mails in this folder" = "Modifier les indicateurs sur les messages";
|
||||
"Insert, copy and move mails into this folder" = "Insérer, copier et déplacer des messages dans ce dossier";
|
||||
"Post mails" = "Poster des messages";
|
||||
"Add subfolders to this folder" = "Ajouter des sous-dossiers à ce dossier";
|
||||
"Remove this folder" = "Effacer ce dossier";
|
||||
"Erase mails from this folder" = "Effacer des messages de ce dossier";
|
||||
"Expunge this folder" = "Compacter ce dossier";
|
||||
"Modify the acl of this folder" = "Administrer les droits sur ce dossier";
|
||||
"List and see this folder" = "Diesen Ordner sehen";
|
||||
"Read mails from this folder" = "E-Mails in diesem Ordner lesen";
|
||||
"Mark mails read and unread" = "E-Mails in diesem Ordner als (un)gelesen markieren";
|
||||
"Modify the flags of the mails in this folder" = "Schlagwörter in diesem Ordner verändern";
|
||||
"Insert, copy and move mails into this folder" = "E-Mails in diesem Ordner hinzufügen, kopieren und verschieben";
|
||||
"Post mails" = "E-Mails versenden";
|
||||
"Add subfolders to this folder" = "Neue Unterordner anlegen";
|
||||
"Remove this folder" = "Diesen Ordner löschen";
|
||||
"Erase mails from this folder" = "E-Mails in diesem Ordner löschen";
|
||||
"Expunge this folder" = "Diesen Ordner komprimieren";
|
||||
"Modify the acl of this folder" = "Benutzerrechte dieses Ordners verändern";
|
||||
|
||||
"Update" = "Mettre à jour";
|
||||
"Update" = "Speichern";
|
||||
"Cancel" = "Abbrechen";
|
||||
|
||||
/* Mail edition */
|
||||
@@ -136,12 +136,18 @@
|
||||
"New Folder..." = "Neuer Ordner...";
|
||||
"Compact This Folder" = "Komprimieren";
|
||||
"Search Messages..." = "Suchen...";
|
||||
"Sharing..." = "Partage...";
|
||||
"Sharing..." = "Benutzerrechte...";
|
||||
"New Subfolder..." = "Neuer Unterordner...";
|
||||
"Rename Folder..." = "Umbenennen...";
|
||||
"Delete Folder" = "Löschen";
|
||||
"Use This Folder For" = "Use This Folder For";
|
||||
"Get Messages for Account" = "Neue Nachrichten empfangen";
|
||||
|
||||
/* Use This Folder menu */
|
||||
"Sent Messages" = "Sent Messages";
|
||||
"Drafts" = "Drafts";
|
||||
"Deleted Messages" = "Deleted Messages";
|
||||
|
||||
/* Message list popup menu */
|
||||
"Open Message In New Window" = "In neuem Fenster õffnen";
|
||||
"Reply to Sender Only" = "Antworten nur an Absender";
|
||||
@@ -158,6 +164,8 @@
|
||||
"Print..." = "Drucken...";
|
||||
"Delete Message" = "Lõschen";
|
||||
|
||||
"This Folder" = "This Folder";
|
||||
|
||||
/* Label popup menu */
|
||||
"None" = "Aucune";
|
||||
"Important" = "Important";
|
||||
@@ -186,5 +194,14 @@
|
||||
|
||||
"quotasFormat" = "Quota: %{0} von %{1} KB verwendet; %{2}%";
|
||||
|
||||
"Please select a message." = "Sie müssen eine Nachricht auswählen.";
|
||||
"Please select a message to print." = "Sie müssen eine Nachricht zum Drucken auswählen.";
|
||||
"Please select only one message to print." = "Bitte wählen Sie nur eine Nachricht zum Drucken aus.";
|
||||
|
||||
"You need to choose a non-virtual folder!" = "You need to choose a non-virtual folder!";
|
||||
"You need to choose a root subfolder!" = "You need to choose a root subfolder!";
|
||||
|
||||
"Moving a message into its own folder is impossible!"
|
||||
= "Moving a message into its own folder is impossible!";
|
||||
"Copying a message into its own folder is impossible!"
|
||||
= "Copying a message into its own folder is impossible!";
|
||||
|
||||
@@ -5,23 +5,27 @@
|
||||
onclick = "return clickedEditorSend(this);";
|
||||
image = "tb-compose-send-flat-24x24.png";
|
||||
cssClass = "tbicon_send";
|
||||
label = "Send"; },
|
||||
label = "Send";
|
||||
tooltip = "Send this message now"; },
|
||||
{ link = "#";
|
||||
onclick = "return onContactAdd(null);";
|
||||
image = "tb-compose-contacts-flat-24x24.png";
|
||||
cssClass = "tbicon_addressbook";
|
||||
label = "Contacts"; },
|
||||
label = "Contacts";
|
||||
tooltip = "Select a recipient from an Address Book"; },
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
onclick = "return clickedEditorAttach(this)";
|
||||
image = "tb-compose-attach-flat-24x24.png";
|
||||
cssClass = "tbicon_attach";
|
||||
label = "Attach"; },
|
||||
label = "Attach";
|
||||
tooltip = "Include an attachment"; },
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
onclick = "return clickedEditorSave(this);";
|
||||
image = "tb-mail-file-flat-24x24.png";
|
||||
cssClass = "tbicon_save";
|
||||
label = "Save"; },
|
||||
label = "Save";
|
||||
tooltip = "Save this message"; },
|
||||
)
|
||||
)
|
||||
|
||||
@@ -6,16 +6,21 @@
|
||||
cssClass = "tbicon_getmail";
|
||||
label = "Get Mail";
|
||||
onclick = "return refreshMailbox(this);";
|
||||
},
|
||||
tooltip = "Get new messages"; },
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-write-flat-24x24.png";
|
||||
onclick = "return onComposeMessage();";
|
||||
cssClass = "tbicon_compose"; label = "Write"; },
|
||||
{ link = "#"; target = "addressbook";
|
||||
cssClass = "tbicon_compose";
|
||||
label = "Write";
|
||||
tooltip = "Create a new message"; },
|
||||
{ link = "#";
|
||||
target = "addressbook";
|
||||
onclick = "openAddressbook(this);return false;";
|
||||
image = "tb-mail-addressbook-flat-24x24.png";
|
||||
cssClass = "tbicon_addressbook"; label = "Addressbook"; },
|
||||
cssClass = "tbicon_addressbook";
|
||||
label = "Addressbook";
|
||||
tooltip = "Go to address book"; },
|
||||
),
|
||||
|
||||
( // second group
|
||||
@@ -23,19 +28,23 @@
|
||||
onclick = "return openMessageWindowsForSelection('reply');";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-reply-flat-24x24.png";
|
||||
cssClass = "tbicon_reply"; label = "Reply"; },
|
||||
|
||||
cssClass = "tbicon_reply";
|
||||
label = "Reply";
|
||||
tooltip = "Reply to the message"; },
|
||||
{ link = "replyall";
|
||||
onclick = "return openMessageWindowsForSelection('replyall');";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-replyall-flat-24x24.png";
|
||||
cssClass = "tbicon_replyall"; label = "Reply All"; },
|
||||
|
||||
cssClass = "tbicon_replyall";
|
||||
label = "Reply All";
|
||||
tooltip = "Reply to sender and all recipients"; },
|
||||
{ link = "forward";
|
||||
onclick = "return openMessageWindowsForSelection('forward');";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-forward-flat-24x24.png";
|
||||
cssClass = "tbicon_forward"; label = "Forward"; },
|
||||
cssClass = "tbicon_forward";
|
||||
label = "Forward";
|
||||
tooltip = "Forward selected message"; },
|
||||
),
|
||||
|
||||
( // third group
|
||||
@@ -44,22 +53,27 @@
|
||||
onclick = "onMenuDeleteMessage(event);";
|
||||
// enabled = showMarkDeletedButton;
|
||||
image = "tb-mail-delete-flat-24x24.png";
|
||||
cssClass = "tbicon_delete"; label = "Delete"; },
|
||||
cssClass = "tbicon_delete";
|
||||
label = "Delete";
|
||||
tooltip = "Delete selected message or folder"; },
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-junk-flat-24x24.png";
|
||||
cssClass = "tbicon_junk"; label = "Junk";
|
||||
},
|
||||
cssClass = "tbicon_junk";
|
||||
label = "Junk";
|
||||
tooltip = "Mark the selected messages as junk"; },
|
||||
),
|
||||
(
|
||||
{ link = "#";
|
||||
onclick = "return onPrintCurrentMessage(event);";
|
||||
cssClass = "tbicon_print";
|
||||
image = "tb-mail-print-flat-24x24.png";
|
||||
label = "Print"; },
|
||||
label = "Print";
|
||||
tooltip = "Print this message"; },
|
||||
{ link = "#";
|
||||
image = "tb-mail-stop-flat-24x24.png";
|
||||
cssClass = "tbicon_stop";
|
||||
label = "Stop"; },
|
||||
label = "Stop";
|
||||
tooltip = "Stop the current transfer"; },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -108,8 +108,7 @@
|
||||
rawFolders = [co allFolderPaths];
|
||||
folders = [self _jsonFolders: [rawFolders objectEnumerator]];
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 200];
|
||||
response = [self responseWithStatus: 200];
|
||||
[response setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
[response appendContentString: [folders jsonRepresentation]];
|
||||
|
||||
+101
-29
@@ -25,6 +25,8 @@
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
|
||||
#import <SoObjects/Mailer/SOGoDraftObject.h>
|
||||
#import <SoObjects/Mailer/SOGoDraftsFolder.h>
|
||||
#import <SoObjects/Mailer/SOGoMailAccount.h>
|
||||
@@ -36,27 +38,6 @@
|
||||
|
||||
@implementation UIxMailActions
|
||||
|
||||
- (WOResponse *) editAction
|
||||
{
|
||||
SOGoMailAccount *account;
|
||||
SOGoMailObject *co;
|
||||
SOGoDraftsFolder *folder;
|
||||
SOGoDraftObject *newMail;
|
||||
NSString *newLocation;
|
||||
|
||||
co = [self clientObject];
|
||||
account = [co mailAccountFolder];
|
||||
folder = [account draftsFolderInContext: context];
|
||||
newMail = [folder newDraft];
|
||||
[newMail fetchMailForEditing: co];
|
||||
[newMail storeInfo];
|
||||
|
||||
newLocation = [NSString stringWithFormat: @"%@/edit",
|
||||
[newMail baseURLInContext: context]];
|
||||
|
||||
return [self redirectToLocation: newLocation];
|
||||
}
|
||||
|
||||
- (WOResponse *) replyToAll: (BOOL) toAll
|
||||
{
|
||||
SOGoMailAccount *account;
|
||||
@@ -107,7 +88,103 @@
|
||||
return [self redirectToLocation: newLocation];
|
||||
}
|
||||
|
||||
- (id) trashAction
|
||||
{
|
||||
id response;
|
||||
|
||||
response = [[self clientObject] trashInContext: context];
|
||||
if (!response)
|
||||
response = [self responseWith204];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (id) moveAction
|
||||
{
|
||||
NSString *destinationFolder;
|
||||
id response;
|
||||
|
||||
destinationFolder = [[context request] formValueForKey: @"folder"];
|
||||
if ([destinationFolder length] > 0)
|
||||
{
|
||||
response = [[self clientObject] moveToFolderNamed: destinationFolder
|
||||
inContext: context];
|
||||
if (!response)
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
response = [NSException exceptionWithHTTPStatus: 500 /* Server Error */
|
||||
reason: @"No destination folder given"];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (id) copyAction
|
||||
{
|
||||
NSString *destinationFolder;
|
||||
id response;
|
||||
|
||||
destinationFolder = [[context request] formValueForKey: @"folder"];
|
||||
if ([destinationFolder length] > 0)
|
||||
{
|
||||
response = [[self clientObject] copyToFolderNamed: destinationFolder
|
||||
inContext: context];
|
||||
if (!response)
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
response = [NSException exceptionWithHTTPStatus: 500 /* Server Error */
|
||||
reason: @"No destination folder given"];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/* active message */
|
||||
|
||||
- (id) markMessageUnreadAction
|
||||
{
|
||||
id response;
|
||||
|
||||
response = [[self clientObject] removeFlags: @"seen"];
|
||||
if (!response)
|
||||
response = [self responseWith204];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (id) markMessageReadAction
|
||||
{
|
||||
id response;
|
||||
|
||||
response = [[self clientObject] addFlags: @"seen"];
|
||||
if (!response)
|
||||
response = [self responseWith204];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/* SOGoDraftObject */
|
||||
- (WOResponse *) editAction
|
||||
{
|
||||
SOGoMailAccount *account;
|
||||
SOGoMailObject *co;
|
||||
SOGoDraftsFolder *folder;
|
||||
SOGoDraftObject *newMail;
|
||||
NSString *newLocation;
|
||||
|
||||
co = [self clientObject];
|
||||
account = [co mailAccountFolder];
|
||||
folder = [account draftsFolderInContext: context];
|
||||
newMail = [folder newDraft];
|
||||
[newMail fetchMailForEditing: co];
|
||||
[newMail storeInfo];
|
||||
|
||||
newLocation = [NSString stringWithFormat: @"%@/edit",
|
||||
[newMail baseURLInContext: context]];
|
||||
|
||||
return [self redirectToLocation: newLocation];
|
||||
}
|
||||
|
||||
- (id) deleteAction
|
||||
{
|
||||
SOGoDraftObject *draft;
|
||||
@@ -119,10 +196,7 @@
|
||||
if (error)
|
||||
response = error;
|
||||
else
|
||||
{
|
||||
response = [context response];
|
||||
[response setStatus: 204];
|
||||
}
|
||||
response = [self responseWith204];
|
||||
|
||||
return response;
|
||||
}
|
||||
@@ -132,17 +206,15 @@
|
||||
WOResponse *response;
|
||||
NSString *filename;
|
||||
|
||||
response = [context response];
|
||||
|
||||
filename = [[context request] formValueForKey: @"filename"];
|
||||
if ([filename length] > 0)
|
||||
{
|
||||
response = [self responseWith204];
|
||||
[[self clientObject] deleteAttachmentWithName: filename];
|
||||
[response setStatus: 204];
|
||||
}
|
||||
else
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"How did you end up here?"];
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
|
||||
@implementation UIxMailEditor
|
||||
|
||||
static BOOL keepMailTmpFile = NO;
|
||||
static BOOL showInternetMarker = NO;
|
||||
static BOOL useLocationBasedSentFolder = NO;
|
||||
static NSDictionary *internetMailHeaders = nil;
|
||||
@@ -85,13 +84,9 @@ static NSArray *infoKeys = nil;
|
||||
|
||||
infoKeys = [[NSArray alloc] initWithObjects:
|
||||
@"subject", @"to", @"cc", @"bcc",
|
||||
@"from", @"replyTo",
|
||||
@"from", @"replyTo", @"inReplyTo",
|
||||
nil];
|
||||
|
||||
keepMailTmpFile = [ud boolForKey:@"SOGoMailEditorKeepTmpFile"];
|
||||
if (keepMailTmpFile)
|
||||
NSLog(@"WARNING: keeping mail files.");
|
||||
|
||||
useLocationBasedSentFolder =
|
||||
[ud boolForKey:@"SOGoUseLocationBasedSentFolder"];
|
||||
|
||||
@@ -409,10 +404,7 @@ static NSArray *infoKeys = nil;
|
||||
{
|
||||
result = [[self clientObject] save];
|
||||
if (!result)
|
||||
{
|
||||
result = [context response];
|
||||
[result setStatus: 204];
|
||||
}
|
||||
result = [self responseWith204];
|
||||
}
|
||||
else
|
||||
result = [self failedToSaveFormResponse];
|
||||
@@ -450,7 +442,7 @@ static NSArray *infoKeys = nil;
|
||||
{
|
||||
result = [[self clientObject] sendMail];
|
||||
if (!result)
|
||||
result = [self jsCloseWithRefreshMethod: nil];
|
||||
result = [self jsCloseWithRefreshMethod: @"refreshFolderByType(\"sent\")"];
|
||||
}
|
||||
else
|
||||
result = [self failedToSaveFormResponse];
|
||||
|
||||
@@ -24,8 +24,10 @@
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGImap4/NGImap4Connection.h>
|
||||
@@ -35,6 +37,9 @@
|
||||
#import <SoObjects/Mailer/SOGoTrashFolder.h>
|
||||
#import <SoObjects/Mailer/SOGoMailAccount.h>
|
||||
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
|
||||
#import <UI/Common/WODirectAction+SOGo.h>
|
||||
|
||||
#import "UIxMailFolderActions.h"
|
||||
|
||||
@@ -49,7 +54,6 @@
|
||||
NSString *folderName;
|
||||
|
||||
co = [self clientObject];
|
||||
response = [context response];
|
||||
|
||||
folderName = [[context request] formValueForKey: @"name"];
|
||||
if ([folderName length] > 0)
|
||||
@@ -58,15 +62,15 @@
|
||||
error = [connection createMailbox: folderName atURL: [co imap4URL]];
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Unable to create folder."];
|
||||
}
|
||||
else
|
||||
[response setStatus: 204];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Missing 'name' parameter."];
|
||||
}
|
||||
|
||||
@@ -100,7 +104,6 @@
|
||||
NSURL *srcURL, *destURL;
|
||||
|
||||
co = [self clientObject];
|
||||
response = [context response];
|
||||
|
||||
folderName = [[context request] formValueForKey: @"name"];
|
||||
if ([folderName length] > 0)
|
||||
@@ -112,15 +115,15 @@
|
||||
toURL: destURL];
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Unable to rename folder."];
|
||||
}
|
||||
else
|
||||
[response setStatus: 204];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Missing 'name' parameter."];
|
||||
}
|
||||
|
||||
@@ -154,7 +157,6 @@
|
||||
NSURL *srcURL, *destURL;
|
||||
|
||||
co = [self clientObject];
|
||||
response = [context response];
|
||||
connection = [co imap4Connection];
|
||||
srcURL = [co imap4URL];
|
||||
destURL = [self _trashedURLOfFolder: srcURL
|
||||
@@ -164,15 +166,64 @@
|
||||
toURL: destURL];
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Unable to move folder."];
|
||||
}
|
||||
else
|
||||
[response setStatus: 204];
|
||||
response = [self responseWith204];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) _setFolderPurpose: (NSString *) purpose
|
||||
{
|
||||
SOGoMailFolder *co;
|
||||
WOResponse *response;
|
||||
NSUserDefaults *ud;
|
||||
NSMutableDictionary *mailSettings;
|
||||
|
||||
co = [self clientObject];
|
||||
if ([NSStringFromClass ([co class]) isEqualToString: @"SOGoMailFolder"])
|
||||
{
|
||||
ud = [[context activeUser] userSettings];
|
||||
mailSettings = [ud objectForKey: @"Mail"];
|
||||
if (!mailSettings)
|
||||
{
|
||||
mailSettings = [NSMutableDictionary new];
|
||||
[mailSettings autorelease];
|
||||
}
|
||||
[ud setObject: mailSettings forKey: @"Mail"];
|
||||
[mailSettings setObject: [co relativeImap4Name]
|
||||
forKey: [NSString stringWithFormat: @"%@Folder",
|
||||
purpose]];
|
||||
[ud synchronize];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
{
|
||||
response = [self responseWithStatus: 500];
|
||||
[response
|
||||
appendContentString: @"Unable to change the purpose of this folder."];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) setAsDraftsFolderAction
|
||||
{
|
||||
return [self _setFolderPurpose: @"Drafts"];
|
||||
}
|
||||
|
||||
- (WOResponse *) setAsSentFolderAction
|
||||
{
|
||||
return [self _setFolderPurpose: @"Sent"];
|
||||
}
|
||||
|
||||
- (WOResponse *) setAsTrashFolderAction
|
||||
{
|
||||
return [self _setFolderPurpose: @"Trash"];
|
||||
}
|
||||
|
||||
- (WOResponse *) expungeAction
|
||||
{
|
||||
NSException *error;
|
||||
@@ -180,18 +231,17 @@
|
||||
WOResponse *response;
|
||||
|
||||
co = [self clientObject];
|
||||
response = [context response];
|
||||
|
||||
error = [co expunge];
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Unable to expunge folder."];
|
||||
}
|
||||
else
|
||||
{
|
||||
[co flushMailCaches];
|
||||
[response setStatus: 204];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
|
||||
return response;
|
||||
@@ -207,7 +257,6 @@
|
||||
NSURL *currentURL;
|
||||
|
||||
co = [self clientObject];
|
||||
response = [context response];
|
||||
|
||||
error = [co addFlagsToAllMessages: @"deleted"];
|
||||
if (!error)
|
||||
@@ -226,11 +275,11 @@
|
||||
}
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Unable to empty the trash folder."];
|
||||
}
|
||||
else
|
||||
[response setStatus: 204];
|
||||
response = [self responseWith204];
|
||||
|
||||
return response;
|
||||
}
|
||||
@@ -242,7 +291,6 @@
|
||||
WOResponse *response;
|
||||
SOGoMailFolder *clientObject;
|
||||
|
||||
response = [context response];
|
||||
mailInvitationParam
|
||||
= [[context request] formValueForKey: @"mail-invitation"];
|
||||
if ([mailInvitationParam boolValue])
|
||||
@@ -257,7 +305,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
[response setStatus: 500];
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"How did you end up here?"];
|
||||
}
|
||||
|
||||
@@ -283,8 +331,7 @@
|
||||
NGImap4Client *client;
|
||||
NSString *responseString;
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 200];
|
||||
response = [self responseWithStatus: 200];
|
||||
[response setHeader: @"text/plain; charset=UTF-8"
|
||||
forKey: @"content-type"];
|
||||
|
||||
|
||||
@@ -98,6 +98,24 @@ static int attachmentFlagSize = 8096;
|
||||
return [dateFormatter formattedDateAndTime: messageDate];
|
||||
}
|
||||
|
||||
- (NSString *) messageSubject
|
||||
{
|
||||
NSString *subject;
|
||||
id envSubject;
|
||||
|
||||
envSubject = [[message valueForKey: @"envelope"] subject];
|
||||
if ([envSubject isKindOfClass: [NSData class]])
|
||||
{
|
||||
subject = [[NSString alloc] initWithData: envSubject
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[subject autorelease];
|
||||
}
|
||||
else
|
||||
subject = envSubject;
|
||||
|
||||
return subject;
|
||||
}
|
||||
|
||||
- (BOOL) showToAddress
|
||||
{
|
||||
NSString *ftype;
|
||||
@@ -140,6 +158,7 @@ static int attachmentFlagSize = 8096;
|
||||
flags = [[self message] valueForKey:@"flags"];
|
||||
return [flags containsObject:@"seen"];
|
||||
}
|
||||
|
||||
- (NSString *) messageUidString
|
||||
{
|
||||
return [[[self message] valueForKey:@"uid"] stringValue];
|
||||
@@ -220,10 +239,24 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
- (NSArray *) sortedUIDs
|
||||
{
|
||||
EOQualifier *fetchQualifier, *notDeleted;
|
||||
if (!sortedUIDs)
|
||||
{
|
||||
notDeleted = [EOQualifier qualifierWithQualifierFormat:
|
||||
@"(not (flags = %@))",
|
||||
@"deleted"];
|
||||
if (qualifier)
|
||||
{
|
||||
fetchQualifier = [[EOAndQualifier alloc] initWithQualifiers:
|
||||
notDeleted, qualifier,
|
||||
nil];
|
||||
[fetchQualifier autorelease];
|
||||
}
|
||||
else
|
||||
fetchQualifier = notDeleted;
|
||||
|
||||
sortedUIDs
|
||||
= [[self clientObject] fetchUIDsMatchingQualifier: qualifier
|
||||
= [[self clientObject] fetchUIDsMatchingQualifier: fetchQualifier
|
||||
sortOrdering: [self imap4SortOrdering]];
|
||||
[sortedUIDs retain];
|
||||
}
|
||||
@@ -406,36 +439,8 @@ static int attachmentFlagSize = 8096;
|
||||
return [self redirectToLocation:url];
|
||||
}
|
||||
|
||||
/* active message */
|
||||
|
||||
- (SOGoMailObject *) lookupActiveMessage
|
||||
{
|
||||
NSString *uid;
|
||||
|
||||
if ((uid = [[context request] formValueForKey: @"uid"]) == nil)
|
||||
return nil;
|
||||
|
||||
return [[self clientObject] lookupName: uid
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
}
|
||||
|
||||
/* actions */
|
||||
|
||||
- (BOOL) isJavaScriptRequest
|
||||
{
|
||||
return [[[context request] formValueForKey:@"jsonly"] boolValue];
|
||||
}
|
||||
|
||||
- (id) javaScriptOK
|
||||
{
|
||||
WOResponse *r;
|
||||
|
||||
r = [context response];
|
||||
[r setStatus:200 /* OK */];
|
||||
return r;
|
||||
}
|
||||
|
||||
- (int) firstMessageOfPageFor: (int) messageNbr
|
||||
{
|
||||
NSArray *messageNbrs;
|
||||
@@ -461,26 +466,23 @@ static int attachmentFlagSize = 8096;
|
||||
|
||||
if ([criteria isEqualToString: @"subject"])
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat:
|
||||
@"(subject doesContain: %@)",
|
||||
value];
|
||||
@"(subject doesContain: %@)", value];
|
||||
else if ([criteria isEqualToString: @"sender"])
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat:
|
||||
@"(from doesContain: %@)",
|
||||
value];
|
||||
@"(from doesContain: %@)", value];
|
||||
else if ([criteria isEqualToString: @"subject_or_sender"])
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat:
|
||||
@"(subject doesContain: %@) OR "
|
||||
@"(from doesContain: %@)",
|
||||
@"((subject doesContain: %@)"
|
||||
@" OR (from doesContain: %@))",
|
||||
value, value];
|
||||
else if ([criteria isEqualToString: @"to_or_cc"])
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat:
|
||||
@"(to doesContain: %@) OR "
|
||||
@"(cc doesContain: %@)",
|
||||
@"((to doesContain: %@)"
|
||||
@" OR (cc doesContain: %@))",
|
||||
value, value];
|
||||
else if ([criteria isEqualToString: @"entire_message"])
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat:
|
||||
@"(message doesContain: %@)",
|
||||
value];
|
||||
@"(body doesContain: %@)", value];
|
||||
else
|
||||
qualifier = nil;
|
||||
|
||||
@@ -499,8 +501,7 @@ static int attachmentFlagSize = 8096;
|
||||
specificMessage = [request formValueForKey: @"pageforuid"];
|
||||
searchCriteria = [request formValueForKey: @"search"];
|
||||
searchValue = [request formValueForKey: @"value"];
|
||||
if ([searchCriteria length] > 0
|
||||
&& [searchValue length] > 0)
|
||||
if ([searchValue length])
|
||||
[self _setQualifierForCriteria: searchCriteria
|
||||
andValue: searchValue];
|
||||
|
||||
@@ -508,43 +509,9 @@ static int attachmentFlagSize = 8096;
|
||||
= ((specificMessage)
|
||||
? [self firstMessageOfPageFor: [specificMessage intValue]]
|
||||
: [[request formValueForKey:@"idx"] intValue]);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) viewAction
|
||||
{
|
||||
return [self defaultAction];
|
||||
}
|
||||
|
||||
- (id) markMessageUnreadAction
|
||||
{
|
||||
NSException *error;
|
||||
|
||||
if ((error = [[self lookupActiveMessage] removeFlags:@"seen"]) != nil)
|
||||
// TODO: improve error handling
|
||||
return error;
|
||||
|
||||
if ([self isJavaScriptRequest])
|
||||
return [self javaScriptOK];
|
||||
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
|
||||
- (id) markMessageReadAction
|
||||
{
|
||||
NSException *error;
|
||||
|
||||
if ((error = [[self lookupActiveMessage] addFlags:@"seen"]) != nil)
|
||||
// TODO: improve error handling
|
||||
return error;
|
||||
|
||||
if ([self isJavaScriptRequest])
|
||||
return [self javaScriptOK];
|
||||
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
|
||||
- (id) getMailAction
|
||||
{
|
||||
// TODO: we might want to flush the caches?
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#import <Foundation/NSString.h>
|
||||
#import <SoObjects/Mailer/SOGoMailObject.h>
|
||||
|
||||
#import <UI/Common/WODirectAction+SOGo.h>
|
||||
|
||||
#import "UIxMailSourceView.h"
|
||||
|
||||
@implementation UIxMailSourceView
|
||||
@@ -36,8 +38,7 @@
|
||||
|
||||
source = [[self clientObject] contentAsString];
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 200];
|
||||
response = [self responseWithStatus: 200];
|
||||
[response setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
[response appendContentString: source];
|
||||
|
||||
+30
-138
@@ -142,37 +142,42 @@ static NSString *mailETag = nil;
|
||||
|
||||
- (id) defaultAction
|
||||
{
|
||||
WOResponse *response;
|
||||
NSString *s;
|
||||
|
||||
/* check etag to see whether we really must rerender */
|
||||
if (mailETag != nil ) {
|
||||
/*
|
||||
Note: There is one thing which *can* change for an existing message,
|
||||
those are the IMAP4 flags (and annotations, which we do not use).
|
||||
Since we don't render the flags, it should be OK, if this changes
|
||||
we must embed the flagging into the etag.
|
||||
*/
|
||||
NSString *s;
|
||||
|
||||
if ((s = [[context request] headerForKey:@"if-none-match"])) {
|
||||
if ([s rangeOfString:mailETag].length > 0) { /* not perfectly correct */
|
||||
/* client already has the proper entity */
|
||||
// [self logWithFormat:@"MATCH: %@ (tag %@)", s, mailETag];
|
||||
|
||||
if (![[self clientObject] doesMailExist]) {
|
||||
return [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"message got deleted"];
|
||||
if (mailETag)
|
||||
{
|
||||
/*
|
||||
Note: There is one thing which *can* change for an existing message,
|
||||
those are the IMAP4 flags (and annotations, which we do not use).
|
||||
Since we don't render the flags, it should be OK, if this changes
|
||||
we must embed the flagging into the etag.
|
||||
*/
|
||||
s = [[context request] headerForKey: @"if-none-match"];
|
||||
if (s)
|
||||
{
|
||||
if ([s rangeOfString:mailETag].length > 0) /* not perfectly correct */
|
||||
{
|
||||
/* client already has the proper entity */
|
||||
// [self logWithFormat:@"MATCH: %@ (tag %@)", s, mailETag];
|
||||
|
||||
if (![[self clientObject] doesMailExist]) {
|
||||
return [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"message got deleted"];
|
||||
}
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 304 /* Not Modified */];
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
[[context response] setStatus:304 /* Not Modified */];
|
||||
return [context response];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ([self message] == nil) {
|
||||
// TODO: redirect to proper error
|
||||
if (![self message]) // TODO: redirect to proper error
|
||||
return [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"did not find specified message!"];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
@@ -201,119 +206,6 @@ static NSString *mailETag = nil;
|
||||
return [self redirectToLocation: url];
|
||||
}
|
||||
|
||||
- (id) deleteAction
|
||||
{
|
||||
NSException *ex;
|
||||
|
||||
if (![self isDeletableClientObject]) {
|
||||
return [NSException exceptionWithHTTPStatus:400 /* Bad Request */
|
||||
reason:@"method cannot be invoked on "
|
||||
@"the specified object"];
|
||||
}
|
||||
|
||||
if ([self isInvokedBySafeMethod]) {
|
||||
// TODO: fix UI to use POST for unsafe actions
|
||||
[self logWithFormat:@"WARNING: method is invoked using safe HTTP method!"];
|
||||
}
|
||||
|
||||
if ((ex = [[self clientObject] delete]) != nil) {
|
||||
id url;
|
||||
|
||||
url = [[ex reason] stringByEscapingURL];
|
||||
url = [@"view?error=" stringByAppendingString:url];
|
||||
return [self redirectToLocation:url];
|
||||
//return ex;
|
||||
}
|
||||
|
||||
if (![self isInlineViewer]) {
|
||||
// if everything is ok, close the window (send a JS closing the Window)
|
||||
id page;
|
||||
|
||||
page = [self pageWithName:@"UIxMailWindowCloser"];
|
||||
[page takeValue:@"YES" forKey:@"refreshOpener"];
|
||||
return page;
|
||||
}
|
||||
|
||||
return [self redirectToParentFolder];
|
||||
}
|
||||
|
||||
- (id) trashAction
|
||||
{
|
||||
NSException *ex;
|
||||
|
||||
if ([self isInvokedBySafeMethod]) {
|
||||
// TODO: fix UI to use POST for unsafe actions
|
||||
[self logWithFormat:@"WARNING: method is invoked using safe HTTP method!"];
|
||||
}
|
||||
|
||||
if ((ex = [[self clientObject] trashInContext:context]) != nil) {
|
||||
id url;
|
||||
|
||||
if ([[[context request] formValueForKey:@"jsonly"] boolValue])
|
||||
/* called using XMLHttpRequest */
|
||||
return ex;
|
||||
|
||||
url = [[ex reason] stringByEscapingURL];
|
||||
url = [@"view?error=" stringByAppendingString:url];
|
||||
return [self redirectToLocation:url];
|
||||
}
|
||||
|
||||
if ([[[context request] formValueForKey:@"jsonly"] boolValue]) {
|
||||
/* called using XMLHttpRequest */
|
||||
[[context response] setStatus:200 /* OK */];
|
||||
return [context response];
|
||||
}
|
||||
|
||||
if (![self isInlineViewer]) {
|
||||
// if everything is ok, close the window (send a JS closing the Window)
|
||||
id page;
|
||||
|
||||
page = [self pageWithName:@"UIxMailWindowCloser"];
|
||||
[page takeValue:@"YES" forKey:@"refreshOpener"];
|
||||
return page;
|
||||
}
|
||||
|
||||
return [self redirectToParentFolder];
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) moveAction
|
||||
{
|
||||
id <WOActionResults> result;
|
||||
NSString *destinationFolder;
|
||||
id url;
|
||||
|
||||
if ([self isInvokedBySafeMethod]) {
|
||||
// TODO: fix UI to use POST for unsafe actions
|
||||
[self logWithFormat:@"WARNING: method is invoked using safe HTTP method!"];
|
||||
}
|
||||
|
||||
destinationFolder = [self queryParameterForKey: @"tofolder"];
|
||||
if ([destinationFolder length] > 0)
|
||||
{
|
||||
result = [[self clientObject] moveToFolderNamed: destinationFolder
|
||||
inContext: context];
|
||||
if (result)
|
||||
{
|
||||
if (![[[context request] formValueForKey:@"jsonly"] boolValue])
|
||||
{
|
||||
url = [NSString stringWithFormat: @"view?error=%@",
|
||||
[[result reason] stringByEscapingURL]];
|
||||
result = [self redirectToLocation: url];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = [context response];
|
||||
[result setStatus: 200];
|
||||
}
|
||||
}
|
||||
else
|
||||
result = [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason: @"No destination folder given"];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* generating response */
|
||||
|
||||
- (void) appendToResponse: (WOResponse *) _response
|
||||
|
||||
+400
-386
@@ -1,435 +1,449 @@
|
||||
{ /* -*-javascript-*- */
|
||||
requires = ( MAIN, MainUI, CommonUI, Mailer, MailPartViewers ); /* , Sieve */
|
||||
{ /* -*-java-*- */
|
||||
requires = ( MAIN, MainUI, CommonUI, Mailer, MailPartViewers ); /* , Sieve */
|
||||
|
||||
publicResources = (
|
||||
"uix.css",
|
||||
"mailer.css",
|
||||
"mailer.js",
|
||||
"generic.js",
|
||||
"searchfield.js",
|
||||
"UIxAppointmentEditor.js",
|
||||
"UIxContactEditor.js",
|
||||
"UIxMailToSelection.js",
|
||||
publicResources = ("uix.css",
|
||||
"mailer.css",
|
||||
"mailer.js",
|
||||
"generic.js",
|
||||
"searchfield.js",
|
||||
"UIxAppointmentEditor.js",
|
||||
"UIxContactEditor.js",
|
||||
"UIxMailToSelection.js",
|
||||
|
||||
"lori_32x32.png",
|
||||
"lori_32x32.png",
|
||||
|
||||
"tbtv_account_17x17.gif",
|
||||
"tbtv_drafts_17x17.gif",
|
||||
"tbtv_inbox_17x17.gif",
|
||||
"tbtv_junction2_17x17.gif",
|
||||
"tbtv_junction_17x17.gif",
|
||||
"tbtv_leaf_corner_17x17.gif",
|
||||
"tbtv_line_17x17.gif",
|
||||
"tbtv_minus_17x17.gif",
|
||||
"tbtv_plus_17x17.gif",
|
||||
"tbtv_corner_17x17.gif",
|
||||
"tbtv_corner_minus_17x17.gif",
|
||||
"tbtv_corner_plus_17x17.gif",
|
||||
"tbtv_sent_17x17.gif",
|
||||
"tbtv_trash_17x17.gif",
|
||||
"tbtv_account_17x17.gif",
|
||||
"tbtv_drafts_17x17.gif",
|
||||
"tbtv_inbox_17x17.gif",
|
||||
"tbtv_junction2_17x17.gif",
|
||||
"tbtv_junction_17x17.gif",
|
||||
"tbtv_leaf_corner_17x17.gif",
|
||||
"tbtv_line_17x17.gif",
|
||||
"tbtv_minus_17x17.gif",
|
||||
"tbtv_plus_17x17.gif",
|
||||
"tbtv_corner_17x17.gif",
|
||||
"tbtv_corner_minus_17x17.gif",
|
||||
"tbtv_corner_plus_17x17.gif",
|
||||
"tbtv_sent_17x17.gif",
|
||||
"tbtv_trash_17x17.gif",
|
||||
|
||||
"tbtb_addressbook.png",
|
||||
"tbtb_compose.png",
|
||||
"tbtb_delete.png",
|
||||
"tbtb_deletedoc.png",
|
||||
"tbtb_filetofolder.png",
|
||||
"tbtb_forward.png",
|
||||
"tbtb_getmail.png",
|
||||
"tbtb_next.png",
|
||||
"tbtb_previous.png",
|
||||
"tbtb_print.png",
|
||||
"tbtb_reply.png",
|
||||
"tbtb_replyall.png",
|
||||
"tbtb_search.png",
|
||||
"tbtb_trash.png",
|
||||
"tbtb_addressbook.png",
|
||||
"tbtb_compose.png",
|
||||
"tbtb_delete.png",
|
||||
"tbtb_deletedoc.png",
|
||||
"tbtb_filetofolder.png",
|
||||
"tbtb_forward.png",
|
||||
"tbtb_getmail.png",
|
||||
"tbtb_next.png",
|
||||
"tbtb_previous.png",
|
||||
"tbtb_print.png",
|
||||
"tbtb_reply.png",
|
||||
"tbtb_replyall.png",
|
||||
"tbtb_search.png",
|
||||
"tbtb_trash.png",
|
||||
|
||||
"tbtb_compose_addressbook_30x30.png",
|
||||
"tbtb_compose_attach_30x30.png",
|
||||
"tbtb_compose_clip_30x30.png",
|
||||
"tbtb_compose_cut_30x30.png",
|
||||
"tbtb_compose_dup_30x30.png",
|
||||
"tbtb_compose_file_30x30.png",
|
||||
"tbtb_compose_lock_30x30.png",
|
||||
"tbtb_compose_quote_30x30.png",
|
||||
"tbtb_compose_send_30x30.png",
|
||||
"tbtb_compose_spell_30x30.png",
|
||||
"tbtb_compose_addressbook_30x30.png",
|
||||
"tbtb_compose_attach_30x30.png",
|
||||
"tbtb_compose_clip_30x30.png",
|
||||
"tbtb_compose_cut_30x30.png",
|
||||
"tbtb_compose_dup_30x30.png",
|
||||
"tbtb_compose_file_30x30.png",
|
||||
"tbtb_compose_lock_30x30.png",
|
||||
"tbtb_compose_quote_30x30.png",
|
||||
"tbtb_compose_send_30x30.png",
|
||||
"tbtb_compose_spell_30x30.png",
|
||||
|
||||
"message-mail.png",
|
||||
"message-mail-read.png",
|
||||
"message-mail.png",
|
||||
"message-mail-read.png",
|
||||
|
||||
"icon_mark_flagged.gif",
|
||||
"icon_mark_read.gif",
|
||||
"icon_mark_unflagged.gif",
|
||||
"icon_mark_unread.gif",
|
||||
"icon_read.gif",
|
||||
"icon_unread.gif",
|
||||
"icon_mark_flagged.gif",
|
||||
"icon_mark_read.gif",
|
||||
"icon_mark_unflagged.gif",
|
||||
"icon_mark_unread.gif",
|
||||
"icon_read.gif",
|
||||
"icon_unread.gif",
|
||||
|
||||
"title_attachment_14x14.png",
|
||||
"title_config.png",
|
||||
"title_junk.png",
|
||||
"title_read_14x14.png",
|
||||
"title_thread.png",
|
||||
"title_sortdown_12x12.png",
|
||||
"title_sortup_12x12.png",
|
||||
);
|
||||
"title_attachment_14x14.png",
|
||||
"title_config.png",
|
||||
"title_junk.png",
|
||||
"title_read_14x14.png",
|
||||
"title_thread.png",
|
||||
"title_sortdown_12x12.png",
|
||||
"title_sortup_12x12.png",
|
||||
);
|
||||
|
||||
factories = {
|
||||
};
|
||||
factories = {
|
||||
};
|
||||
|
||||
categories = {
|
||||
SOGoMailFolder = {
|
||||
categories = {
|
||||
SOGoMailFolder = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
subscribe = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "subscribe";
|
||||
};
|
||||
unsubscribe = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "unsubscribe";
|
||||
};
|
||||
quotas = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "quotas";
|
||||
};
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
ajax = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAjaxRequest";
|
||||
};
|
||||
index = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
GET = { /* hack to make it work as the default method */
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
markMessageUnread = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "markMessageUnread";
|
||||
};
|
||||
markMessageRead = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "markMessageRead";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "getMail";
|
||||
};
|
||||
expunge = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "emptyTrash";
|
||||
};
|
||||
createFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "createFolder";
|
||||
};
|
||||
renameFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "renameFolder";
|
||||
};
|
||||
deleteFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "deleteFolder";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxMailUserRightsEditor";
|
||||
};
|
||||
saveUserRights = {
|
||||
protectedBy = "SaveAcls";
|
||||
pageName = "UIxMailUserRightsEditor";
|
||||
actionName = "saveUserRights";
|
||||
};
|
||||
subscribe = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "subscribe";
|
||||
};
|
||||
unsubscribe = {
|
||||
protectedBy = "<public>";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "unsubscribe";
|
||||
};
|
||||
quotas = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "quotas";
|
||||
};
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
ajax = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAjaxRequest";
|
||||
};
|
||||
index = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
GET = { /* hack to make it work as the default method */
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
actionName = "getMail";
|
||||
};
|
||||
expunge = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "emptyTrash";
|
||||
};
|
||||
createFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "createFolder";
|
||||
};
|
||||
renameFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "renameFolder";
|
||||
};
|
||||
deleteFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "deleteFolder";
|
||||
};
|
||||
setAsDraftsFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "setAsDraftsFolder";
|
||||
};
|
||||
setAsSentFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "setAsSentFolder";
|
||||
};
|
||||
setAsTrashFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "setAsTrashFolder";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxMailUserRightsEditor";
|
||||
};
|
||||
saveUserRights = {
|
||||
protectedBy = "SaveAcls";
|
||||
pageName = "UIxMailUserRightsEditor";
|
||||
actionName = "saveUserRights";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoTrashFolder = {
|
||||
SOGoTrashFolder = {
|
||||
/* just a new toolbar, other things come from SOGoMailFolder */
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
emptyTrash = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "emptyTrash";
|
||||
};
|
||||
emptyTrash = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "emptyTrash";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoMailObject = {
|
||||
SOGoMailObject = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
};
|
||||
viewsource = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailSourceView";
|
||||
actionName = "viewSource";
|
||||
};
|
||||
popupview = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailPopupView";
|
||||
};
|
||||
move = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
actionName = "move";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
actionName = "delete";
|
||||
};
|
||||
trash = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
actionName = "trash";
|
||||
};
|
||||
junk = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
actionName = "junk";
|
||||
};
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "edit";
|
||||
};
|
||||
reply = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "reply";
|
||||
};
|
||||
replyall = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "replyToAll";
|
||||
};
|
||||
forward = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "forward";
|
||||
};
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailView";
|
||||
};
|
||||
viewsource = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailSourceView";
|
||||
actionName = "viewSource";
|
||||
};
|
||||
popupview = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailPopupView";
|
||||
};
|
||||
move = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "move";
|
||||
};
|
||||
copy = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "copy";
|
||||
};
|
||||
trash = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "trash";
|
||||
};
|
||||
junk = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "junk";
|
||||
};
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "edit";
|
||||
};
|
||||
reply = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "reply";
|
||||
};
|
||||
replyall = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "replyToAll";
|
||||
};
|
||||
forward = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "forward";
|
||||
};
|
||||
markMessageUnread = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "markMessageUnread";
|
||||
};
|
||||
markMessageRead = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "markMessageRead";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoMailAccounts = {
|
||||
SOGoMailAccounts = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailMainFrame";
|
||||
};
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailMainFrame";
|
||||
actionName = "compose";
|
||||
};
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailMainFrame";
|
||||
};
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailMainFrame";
|
||||
actionName = "compose";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoMailAccount = {
|
||||
SOGoMailAccount = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoMailObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailAccountActions";
|
||||
actionName = "compose";
|
||||
};
|
||||
mailboxes = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailAccountActions";
|
||||
actionName = "listMailboxes";
|
||||
};
|
||||
createFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "createFolder";
|
||||
};
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailAccountActions";
|
||||
actionName = "compose";
|
||||
};
|
||||
mailboxes = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailAccountActions";
|
||||
actionName = "listMailboxes";
|
||||
};
|
||||
createFolder = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailFolderActions";
|
||||
actionName = "createFolder";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoDraftsFolder = {
|
||||
SOGoDraftsFolder = {
|
||||
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"; },
|
||||
{
|
||||
link = "#"; // "compose"; // target = "_blank";
|
||||
isSafe = NO;
|
||||
onclick = "return openMessageWindow(null, 'compose');";
|
||||
image = "tb-mail-write-flat-24x24.png";
|
||||
cssClass = "tbicon_compose"; label = "Write"; },
|
||||
)
|
||||
);
|
||||
};
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = ( /* the toolbar groups */
|
||||
( /* first group */
|
||||
{ link = "getMail";
|
||||
image = "tb-mail-getmail-flat-24x24.png";
|
||||
cssClass = "tbicon_getmail"; label = "Get Mail"; },
|
||||
{
|
||||
link = "#"; // "compose"; // target = "_blank";
|
||||
isSafe = NO;
|
||||
onclick = "return openMessageWindow(null, 'compose');";
|
||||
image = "tb-mail-write-flat-24x24.png";
|
||||
cssClass = "tbicon_compose"; label = "Write"; },
|
||||
)
|
||||
);
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailListView";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoDraftObject = {
|
||||
SOGoDraftObject = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoDraftObject.toolbar";
|
||||
};
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoDraftObject.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
};
|
||||
save = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
actionName = "save";
|
||||
};
|
||||
send = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
actionName = "send";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "delete";
|
||||
};
|
||||
deleteAttachment = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "deleteAttachment";
|
||||
};
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
};
|
||||
save = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
actionName = "save";
|
||||
};
|
||||
send = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
actionName = "send";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "delete";
|
||||
};
|
||||
deleteAttachment = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "deleteAttachment";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* Sieve */
|
||||
/* Sieve */
|
||||
|
||||
/* SOGoSieveScriptsFolder = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = (
|
||||
(
|
||||
{
|
||||
link = "getMail";
|
||||
image = "tb-mail-getmail-flat-24x24.png";
|
||||
cssClass = "tbicon_getmail"; label = "Get Mail";
|
||||
},
|
||||
{
|
||||
link = "#"; // "compose"; // target = "_blank";
|
||||
onclick = "clickedNewFilter(this); return false";
|
||||
image = "tb-mail-write-flat-24x24.png";
|
||||
cssClass = "tbicon_compose"; label = "New Filter";
|
||||
},
|
||||
),
|
||||
(
|
||||
{ link = "#";
|
||||
cssClass = "tbicon_delete"; label = "Delete"; },
|
||||
),
|
||||
);
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxFilterList";
|
||||
};
|
||||
create = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxFilterList";
|
||||
actionName = "create";
|
||||
};
|
||||
};
|
||||
};
|
||||
// SOGoSieveScriptsFolder = {
|
||||
// slots = {
|
||||
// toolbar = {
|
||||
// protectedBy = "View";
|
||||
// value = (
|
||||
// (
|
||||
// {
|
||||
// link = "getMail";
|
||||
// image = "tb-mail-getmail-flat-24x24.png";
|
||||
// cssClass = "tbicon_getmail"; label = "Get Mail";
|
||||
// },
|
||||
// {
|
||||
// link = "#"; // "compose"; // target = "_blank";
|
||||
// onclick = "clickedNewFilter(this); return false";
|
||||
// image = "tb-mail-write-flat-24x24.png";
|
||||
// cssClass = "tbicon_compose"; label = "New Filter";
|
||||
// },
|
||||
// ),
|
||||
// (
|
||||
// { link = "#";
|
||||
// cssClass = "tbicon_delete"; label = "Delete"; },
|
||||
// ),
|
||||
// );
|
||||
// };
|
||||
// };
|
||||
// methods = {
|
||||
// view = {
|
||||
// protectedBy = "View";
|
||||
// pageName = "UIxFilterList";
|
||||
// };
|
||||
// create = {
|
||||
// protectedBy = "View";
|
||||
// pageName = "UIxFilterList";
|
||||
// actionName = "create";
|
||||
// };
|
||||
// };
|
||||
// };
|
||||
|
||||
SOGoSieveScriptObject = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = (
|
||||
( { link = "#";
|
||||
onclick = "clickedEditorSave(this);return false;";
|
||||
image = "tb-mail-file-flat-24x24.png";
|
||||
cssClass = "tbicon_save"; label = "Save"; },
|
||||
{ link = "#";
|
||||
onclick = "clickedEditorDelete(this);return false;";
|
||||
image = "tb-mail-delete-flat-24x24.png";
|
||||
cssClass = "tbicon_delete"; label = "Delete"; },
|
||||
)
|
||||
);
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxSieveEditor";
|
||||
actionName = "edit";
|
||||
};
|
||||
save = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxSieveEditor";
|
||||
actionName = "save";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxSieveEditor";
|
||||
actionName = "delete";
|
||||
};
|
||||
};
|
||||
}; */
|
||||
};
|
||||
// SOGoSieveScriptObject = {
|
||||
// slots = {
|
||||
// toolbar = {
|
||||
// protectedBy = "View";
|
||||
// value = (
|
||||
// ( { link = "#";
|
||||
// onclick = "clickedEditorSave(this);return false;";
|
||||
// image = "tb-mail-file-flat-24x24.png";
|
||||
// cssClass = "tbicon_save"; label = "Save"; },
|
||||
// { link = "#";
|
||||
// onclick = "clickedEditorDelete(this);return false;";
|
||||
// image = "tb-mail-delete-flat-24x24.png";
|
||||
// cssClass = "tbicon_delete"; label = "Delete"; },
|
||||
// )
|
||||
// );
|
||||
// };
|
||||
// };
|
||||
// methods = {
|
||||
// edit = {
|
||||
// protectedBy = "View";
|
||||
// pageName = "UIxSieveEditor";
|
||||
// actionName = "edit";
|
||||
// };
|
||||
// save = {
|
||||
// protectedBy = "View";
|
||||
// pageName = "UIxSieveEditor";
|
||||
// actionName = "save";
|
||||
// };
|
||||
// delete = {
|
||||
// protectedBy = "View";
|
||||
// pageName = "UIxSieveEditor";
|
||||
// actionName = "delete";
|
||||
// };
|
||||
// }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
"Homepage" = "Homepage";
|
||||
"title" = "SOGo";
|
||||
|
||||
"Internet access unauthorized and" = "Internet access unauthorized and";
|
||||
"Internet access authorized and" = "Internet access authorized and";
|
||||
"internetAccessState_0" = "CLOSED";
|
||||
"internetAccessState_1" = "OPEN";
|
||||
"Login:" = "Login:";
|
||||
"Password:" = "Password:";
|
||||
|
||||
"Automatic vacation messages activation" = "Automatic vacation messages activation";
|
||||
"Internet" = "Internet";
|
||||
"Intranet" = "Intranet";
|
||||
"Connect" = "Connect";
|
||||
|
||||
"Wrong username or password." = "Wrong username or password.";
|
||||
@@ -1,12 +1,10 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
"Homepage" = "Accueil";
|
||||
"title" = "SOGo";
|
||||
|
||||
"Internet access authorized and" = "L'accès depuis internet est autorisé et ";
|
||||
"Internet access unauthorized and" = "L'accès depuis internet est interdit et ";
|
||||
"internetAccessState_0" = "FERMÉ";
|
||||
"internetAccessState_1" = "OUVERT";
|
||||
"Login:" = "Nom d'utilisateur :";
|
||||
"Password:" = "Mot de passe :";
|
||||
|
||||
"Automatic vacation messages activation" = "Activation du message de réponse automatique ";
|
||||
"Internet" = "Internet";
|
||||
"Intranet" = "Intranet";
|
||||
"Connect" = "Connexion";
|
||||
|
||||
"Wrong username or password." = "Mauvais nom d'utilisateur ou mot de passe.";
|
||||
@@ -26,6 +26,9 @@ MainUI_RESOURCE_FILES += \
|
||||
MainUI_LOCALIZED_RESOURCE_FILES += \
|
||||
Locale Localizable.strings
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/sope-gdl1/
|
||||
ADDITIONAL_LIB_DIRS += -L../../SOPE/sope-gdl1/GDLContentStore/obj/
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
"Homepage" = "Startseite";
|
||||
"title" = "SOGo";
|
||||
|
||||
"Internet access authorized and" = "Internetzugang ist erlaubt und ";
|
||||
"Internet access unauthorized and" = "Internetzugang ist nicht erlaubt und ";
|
||||
"internetAccessState_0" = "GESCHLOSSEN";
|
||||
"internetAccessState_1" = "OFFEN";
|
||||
"Login:" = "Benutzername:";
|
||||
"Password:" = "Passwort:";
|
||||
|
||||
"Automatic vacation messages activation" = "Activation du message de réponse automatique ";
|
||||
"Internet" = "Internet";
|
||||
"Intranet" = "Intranet";
|
||||
"Connect" = "Verbinden";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SOGoACLEnglishAdditionAdvisory.m - this file is part of SOGo
|
||||
/* SOGoRootPage.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 Inverse groupe conseil
|
||||
*
|
||||
@@ -20,13 +20,16 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "SOGoACLEnglishAdditionAdvisory.h"
|
||||
#ifndef SOGOROOTPAGE_H
|
||||
#define SOGOROOTPAGE_H
|
||||
|
||||
@implementation SOGoACLEnglishAdditionAdvisory
|
||||
#import <UI/SOGoUI/UIxComponent.h>
|
||||
|
||||
- (NSString *) aclMethod
|
||||
@interface SOGoRootPage : UIxComponent
|
||||
{
|
||||
return @"add";
|
||||
NSString *userName;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SOGOROOTPAGE_H */
|
||||
+58
-111
@@ -19,145 +19,92 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <NGObjWeb/SoComponent.h>
|
||||
#import <NGObjWeb/SoObject.h>
|
||||
#import <NGObjWeb/WOApplication.h>
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WOCookie.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGExtensions/NGBase64Coding.h>
|
||||
#import <NGExtensions/NSNull+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <SOGo/SOGoAuthenticator.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
@interface SOGoRootPage : SoComponent
|
||||
{
|
||||
NSString *userName;
|
||||
}
|
||||
#import <SoObjects/SOGo/SOGoWebAuthenticator.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
|
||||
@end
|
||||
#import "SOGoRootPage.h"
|
||||
|
||||
@implementation SOGoRootPage
|
||||
|
||||
static BOOL doNotRedirect = NO;
|
||||
|
||||
+ (void)initialize {
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
if ((doNotRedirect = [ud boolForKey:@"SOGoDoNotRedirectRootPage"]))
|
||||
NSLog(@"SOGoRootPage: home-page redirect is disabled.");
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->userName release];
|
||||
- (void) dealloc
|
||||
{
|
||||
[userName release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setUserName:(NSString *)_value {
|
||||
ASSIGNCOPY(self->userName, _value);
|
||||
- (void) setUserName: (NSString *) _value
|
||||
{
|
||||
ASSIGNCOPY (userName, _value);
|
||||
}
|
||||
- (NSString *)userName {
|
||||
return self->userName;
|
||||
|
||||
- (NSString *) userName
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
|
||||
- (NSString *) connectURL
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@connect", [self applicationPath]];
|
||||
}
|
||||
|
||||
/* actions */
|
||||
- (id <WOActionResults>) connectAction
|
||||
{
|
||||
WOResponse *response;
|
||||
WOCookie *authCookie;
|
||||
SOGoWebAuthenticator *auth;
|
||||
NSString *cookieValue, *cookieString;
|
||||
|
||||
- (id)connectAction {
|
||||
NSString *url;
|
||||
|
||||
[self takeFormValuesForKeys:@"userName", nil];
|
||||
|
||||
if ([[self userName] length] == 0)
|
||||
return nil;
|
||||
|
||||
url = [@"/" stringByAppendingString:[[self userName] stringByEscapingURL]];
|
||||
if (![url hasSuffix:@"/"])
|
||||
url = [url stringByAppendingString:@"/"];
|
||||
|
||||
url = [[self context] urlWithRequestHandlerKey:@"so"
|
||||
path:url queryString:nil];
|
||||
return [self redirectToLocation:url];
|
||||
auth = [[WOApplication application]
|
||||
authenticatorInContext: context];
|
||||
response = [self responseWith204];
|
||||
cookieString = [NSString stringWithFormat: @"%@:%@",
|
||||
[self queryParameterForKey: @"userName"],
|
||||
[self queryParameterForKey: @"password"]];
|
||||
cookieValue = [NSString stringWithFormat: @"basic %@",
|
||||
[cookieString stringByEncodingBase64]];
|
||||
authCookie = [WOCookie cookieWithName: [auth cookieNameInContext: context]
|
||||
value: cookieValue];
|
||||
[authCookie setPath: @"/"];
|
||||
[response addCookie: authCookie];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (id<WOActionResults>)defaultAction {
|
||||
WOResponse *r;
|
||||
NSString *login, *rhk;
|
||||
id auth, user;
|
||||
id home, base;
|
||||
- (id <WOActionResults>) defaultAction
|
||||
{
|
||||
id <WOActionResults> response;
|
||||
NSString *login, *oldLocation;
|
||||
|
||||
if (doNotRedirect)
|
||||
return self;
|
||||
|
||||
/*
|
||||
Note: ctx.activeUser is NOT set here. Don't know why, so we retrieve
|
||||
the user from the authenticator.
|
||||
*/
|
||||
|
||||
auth = [[self clientObject] authenticatorInContext:[self context]];
|
||||
user = [auth userInContext:[self context]];
|
||||
login = [user login];
|
||||
|
||||
if ([login isEqualToString:@"anonymous"]) {
|
||||
/* use root page for unauthenticated users */
|
||||
return self;
|
||||
}
|
||||
|
||||
/* check base */
|
||||
|
||||
base = [self application];
|
||||
rhk = [[[self context] request] requestHandlerKey];
|
||||
if (([rhk length] == 0) || ([base requestHandlerForKey:rhk] == nil)) {
|
||||
base = [base lookupName:@"so" inContext:[self context] acquire:NO];
|
||||
|
||||
if (![base isNotNull] || [base isKindOfClass:[NSException class]]) {
|
||||
/* use root page if home could not be found */
|
||||
[self errorWithFormat:@"Did not find 'so' request handler!"];
|
||||
return self;
|
||||
login = [[context activeUser] login];
|
||||
if ([login isEqualToString: @"anonymous"])
|
||||
response = self;
|
||||
else
|
||||
{
|
||||
oldLocation = [[self clientObject] baseURLInContext: context];
|
||||
response
|
||||
= [self redirectToLocation: [NSString stringWithFormat: @"%@/%@",
|
||||
oldLocation, login]];
|
||||
}
|
||||
}
|
||||
|
||||
/* lookup home-page */
|
||||
|
||||
home = [base lookupName:login inContext:[self context] acquire:NO];
|
||||
if (![home isNotNull] || [home isKindOfClass:[NSException class]]) {
|
||||
/* use root page if home could not be found */
|
||||
return self;
|
||||
}
|
||||
|
||||
/* redirect to home-page */
|
||||
|
||||
r = [[self context] response];
|
||||
[r setStatus:302 /* moved */];
|
||||
[r setHeader:[home baseURLInContext:[self context]] forKey:@"location"];
|
||||
return r;
|
||||
return response;
|
||||
}
|
||||
|
||||
/* response generation */
|
||||
|
||||
- (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
|
||||
NSString *rhk;
|
||||
|
||||
// TODO: we might also want to look into the HTTP basic-auth to redirect to
|
||||
// the login URL!
|
||||
|
||||
rhk = [[_ctx request] requestHandlerKey];
|
||||
if ([rhk length]==0 || [[self application] requestHandlerForKey:rhk]==nil) {
|
||||
/* a small hack to redirect to a valid URL */
|
||||
NSString *url;
|
||||
|
||||
url = [_ctx urlWithRequestHandlerKey:@"so" path:@"/" queryString:nil];
|
||||
[_response setStatus:302 /* moved */];
|
||||
[_response setHeader:url forKey:@"location"];
|
||||
[self logWithFormat:@"URL: %@", url];
|
||||
return;
|
||||
}
|
||||
|
||||
[super appendToResponse:_response inContext:_ctx];
|
||||
- (BOOL) isPublicInContext: (WOContext *) localContext
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end /* SOGoRootPage */
|
||||
|
||||
@@ -26,14 +26,16 @@
|
||||
#import <Foundation/NSURL.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <NGObjWeb/WOCookie.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <Appointments/SOGoFreeBusyObject.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SoObjects/SOGo/SOGoWebAuthenticator.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
static NSString *defaultModule = nil;
|
||||
@@ -62,8 +64,6 @@ static NSString *defaultModule = nil;
|
||||
@"'Calendar', 'Contacts' or Mail)", defaultModule];
|
||||
defaultModule = @"Calendar";
|
||||
}
|
||||
else
|
||||
defaultModule = @"Calendar";
|
||||
}
|
||||
else
|
||||
defaultModule = @"Calendar";
|
||||
@@ -97,9 +97,9 @@ static NSString *defaultModule = nil;
|
||||
record = [records nextObject];
|
||||
while (record)
|
||||
{
|
||||
status = [record objectForKey: @"status"];
|
||||
status = [record objectForKey: @"c_status"];
|
||||
|
||||
value = [[record objectForKey: @"startdate"] intValue];
|
||||
value = [[record objectForKey: @"c_startdate"] intValue];
|
||||
currentDate = [NSCalendarDate dateWithTimeIntervalSince1970: value];
|
||||
if ([currentDate earlierDate: startDate] == currentDate)
|
||||
startInterval = 0;
|
||||
@@ -107,7 +107,7 @@ static NSString *defaultModule = nil;
|
||||
startInterval
|
||||
= ([currentDate timeIntervalSinceDate: startDate] / 900);
|
||||
|
||||
value = [[record objectForKey: @"enddate"] intValue];
|
||||
value = [[record objectForKey: @"c_enddate"] intValue];
|
||||
currentDate = [NSCalendarDate dateWithTimeIntervalSince1970: value];
|
||||
if ([currentDate earlierDate: endDate] == endDate)
|
||||
endInterval = [items count] - 1;
|
||||
@@ -198,4 +198,34 @@ static NSString *defaultModule = nil;
|
||||
return response;
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) logoffAction
|
||||
{
|
||||
WOResponse *response;
|
||||
WOCookie *cookie;
|
||||
SOGoWebAuthenticator *auth;
|
||||
id container;
|
||||
NSCalendarDate *date;
|
||||
|
||||
container = [[self clientObject] container];
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 302];
|
||||
[response setHeader: [container baseURLInContext: context]
|
||||
forKey: @"location"];
|
||||
auth = [[self clientObject] authenticatorInContext: context];
|
||||
cookie = [WOCookie cookieWithName: [auth cookieNameInContext: context]
|
||||
value: @"discard"];
|
||||
[cookie setPath: @"/"];
|
||||
date = [NSCalendarDate calendarDate];
|
||||
[cookie setExpires: [date yesterday]];
|
||||
[response addCookie: cookie];
|
||||
|
||||
[response setHeader: date forKey: @"Last-Modified"];
|
||||
[response setHeader: @"no-store, no-cache, must-revalidate, max-age=0" forKey: @"Cache-Control"];
|
||||
[response setHeader: @"post-check=0, pre-check=0" forKey: @"Cache-Control"];
|
||||
[response setHeader: @"no-cache" forKey: @"Pragma"];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+27
-9
@@ -1,5 +1,5 @@
|
||||
{
|
||||
requires = ( MAIN );
|
||||
requires = ( MAIN, CommonUI );
|
||||
|
||||
publicResources = (
|
||||
);
|
||||
@@ -10,7 +10,7 @@
|
||||
classes = {
|
||||
SOGoRootPage = {
|
||||
superclass = "SoComponent";
|
||||
protectedBy = "View";
|
||||
protectedBy = "<public>";
|
||||
defaultRoles = {
|
||||
"View" = ( "Authenticated" );
|
||||
};
|
||||
@@ -46,6 +46,14 @@
|
||||
"Access Contents Information" = ( "Owner", "ObjectViewer" );
|
||||
};
|
||||
};
|
||||
SOGoParentFolder = {
|
||||
superclass = "SOGoObject";
|
||||
protectedBy = "Access Contents Information";
|
||||
defaultRoles = {
|
||||
"Access Contents Information" = ( "Authenticated" );
|
||||
"WebDAV Access" = ( "Authenticated" );
|
||||
};
|
||||
};
|
||||
SOGoUserFolder = {
|
||||
superclass = "SOGoFolder";
|
||||
protectedBy = "Access Contents Information";
|
||||
@@ -59,13 +67,18 @@
|
||||
categories = {
|
||||
SOGo = { // TODO: move decls to class
|
||||
methods = {
|
||||
index = {
|
||||
protectedBy = "View";
|
||||
pageName = "SOGoRootPage";
|
||||
view = {
|
||||
protectedBy = "<public>";
|
||||
pageName = "SOGoRootPage";
|
||||
};
|
||||
connect = {
|
||||
protectedBy = "<public>";
|
||||
pageName = "SOGoRootPage";
|
||||
actionName = "connect";
|
||||
};
|
||||
GET = { // more or less a hack, see README of dbd
|
||||
protectedBy = "View";
|
||||
pageName = "SOGoRootPage";
|
||||
protectedBy = "<public>";
|
||||
pageName = "SOGoRootPage";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -77,13 +90,18 @@
|
||||
protectedBy = "<public>";
|
||||
pageName = "SOGoUserHomePage";
|
||||
};
|
||||
logoff = {
|
||||
protectedBy = "<public>";
|
||||
pageName = "SOGoUserHomePage";
|
||||
actionName = "logoff";
|
||||
};
|
||||
};
|
||||
};
|
||||
SOGoGroupsFolder = {
|
||||
methods = {
|
||||
index = {
|
||||
protectedBy = "View";
|
||||
pageName = "SOGoGroupsPage";
|
||||
pageName = "SOGoGroupsPage";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -91,7 +109,7 @@
|
||||
methods = {
|
||||
index = {
|
||||
protectedBy = "View";
|
||||
pageName = "SOGoGroupPage";
|
||||
pageName = "SOGoGroupPage";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"Close" = "Close";
|
||||
|
||||
/* tabs */
|
||||
"Out of Office" = "Out of Office";
|
||||
"Date and Time" = "Date and Time";
|
||||
"General" = "General";
|
||||
"Calendar Options" = "Calendar Options";
|
||||
"Mail Options" = "Mail Options";
|
||||
"Password" = "Password";
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"Close" = "Fermer";
|
||||
|
||||
/* tabs */
|
||||
"Out of Office" = "Absence du bureau";
|
||||
"Date and Time" = "Date et heure";
|
||||
"General" = "Général";
|
||||
"Calendar Options" = "Calendrier";
|
||||
"Mail Options" = "Courrier";
|
||||
"Password" = "Mot de passe";
|
||||
|
||||
@@ -24,6 +24,9 @@ PreferencesUI_RESOURCE_FILES += \
|
||||
PreferencesUI_LOCALIZED_RESOURCE_FILES += \
|
||||
Localizable.strings \
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/sope-gdl1/
|
||||
ADDITIONAL_LIB_DIRS += -L../../SOPE/sope-gdl1/GDLContentStore/obj/
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
"Close" = "Schließen";
|
||||
|
||||
/* tabs */
|
||||
"Out of Office" = "Abwesenheit";
|
||||
"Date and Time" = "Datum und Zeit";
|
||||
"General" = "Allgemein";
|
||||
"Calendar Options" = "Kalender";
|
||||
"Mail Options" = "E-Mail";
|
||||
"Password" = "Passwort";
|
||||
@@ -45,7 +44,7 @@
|
||||
"First week of year :" = "Erste Woche des Jahres:";
|
||||
"Enable reminders for Calendar items" = "Terminerinnerung aktivieren";
|
||||
"Play a sound when a reminder comes due" = "Akustisches Signal zur Terminerinnerung";
|
||||
"Default reminder :" = "Voreingestellte Terminerinnerung:";
|
||||
"Default reminder :" = "Standard Terminerinnerung:";
|
||||
|
||||
"firstWeekOfYear_HideWeekNumbers" = "Keine Wochennummern anzeigen";
|
||||
"firstWeekOfYear_January1" = "Beginnt am 1.Januar";
|
||||
|
||||
@@ -125,7 +125,8 @@ static BOOL shouldDisplayPasswordChange = NO;
|
||||
|
||||
- (NSArray *) timeZonesList
|
||||
{
|
||||
return [NSTimeZone knownTimeZoneNames];
|
||||
return [[NSTimeZone knownTimeZoneNames]
|
||||
sortedArrayUsingSelector: @selector (localizedCaseInsensitiveCompare:)];
|
||||
}
|
||||
|
||||
- (NSString *) userTimeZone
|
||||
|
||||
@@ -27,12 +27,8 @@ libSOGoUI_OBJC_FILES += \
|
||||
SOGoAptFormatter.m \
|
||||
SOGoJSStringFormatter.m \
|
||||
WOContext+UIx.m \
|
||||
\
|
||||
SOGoACLAdvisory.m \
|
||||
SOGoACLFrenchAdditionAdvisory.m \
|
||||
SOGoACLFrenchRemovalAdvisory.m \
|
||||
SOGoACLEnglishAdditionAdvisory.m \
|
||||
SOGoACLEnglishRemovalAdvisory.m
|
||||
SOGoACLAdvisory.m \
|
||||
SOGoFolderAdvisory.m
|
||||
|
||||
# make
|
||||
|
||||
|
||||
@@ -47,4 +47,34 @@
|
||||
|
||||
@end
|
||||
|
||||
@interface SOGoACLAdditionAdvisory : SOGoACLAdvisory
|
||||
|
||||
- (NSString *) aclMethod;
|
||||
|
||||
@end
|
||||
|
||||
@interface SOGoACLRemovalAdvisory : SOGoACLAdvisory
|
||||
|
||||
- (NSString *) aclMethod;
|
||||
|
||||
@end
|
||||
|
||||
@interface SOGoACLEnglishAdditionAdvisory : SOGoACLAdditionAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoACLFrenchAdditionAdvisory : SOGoACLAdditionAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoACLGermanAdditionAdvisory : SOGoACLAdditionAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoACLEnglishRemovalAdvisory : SOGoACLRemovalAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoACLFrenchRemovalAdvisory : SOGoACLRemovalAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoACLGermanRemovalAdvisory : SOGoACLRemovalAdvisory
|
||||
@end
|
||||
|
||||
#endif /* SOGOACLADVISORY_H */
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#import <SoObjects/SOGo/SOGoObject.h>
|
||||
#import <SoObjects/SOGo/LDAPUserManager.h>
|
||||
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
|
||||
#import "SOGoACLAdvisory.h"
|
||||
|
||||
@@ -109,7 +110,7 @@
|
||||
subject = [[self generateResponse] contentAsString];
|
||||
isSubject = NO;
|
||||
|
||||
return [subject stringByTrimmingSpaces];
|
||||
return [[subject stringByTrimmingSpaces] asQPSubjectString: @"utf-8"];
|
||||
}
|
||||
|
||||
- (NSString *) body
|
||||
@@ -126,7 +127,7 @@
|
||||
- (NSString *) aclMethod
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -209,3 +210,33 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation SOGoACLAdditionAdvisory
|
||||
|
||||
- (NSString *) aclMethod { return @"add"; }
|
||||
|
||||
@end
|
||||
|
||||
@implementation SOGoACLRemovalAdvisory
|
||||
|
||||
- (NSString *) aclMethod { return @"remove"; }
|
||||
|
||||
@end
|
||||
|
||||
@implementation SOGoACLEnglishAdditionAdvisory
|
||||
@end
|
||||
|
||||
@implementation SOGoACLFrenchAdditionAdvisory
|
||||
@end
|
||||
|
||||
@implementation SOGoACLGermanAdditionAdvisory
|
||||
@end
|
||||
|
||||
@implementation SOGoACLEnglishRemovalAdvisory
|
||||
@end
|
||||
|
||||
@implementation SOGoACLFrenchRemovalAdvisory
|
||||
@end
|
||||
|
||||
@implementation SOGoACLGermanRemovalAdvisory
|
||||
@end
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/* SOGoACLEnglishAdditionAdvisory.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 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 SOGOACLFRENCHADDITIONADVISORY_H
|
||||
#define SOGOACLFRENCHADDITIONADVISORY_H
|
||||
|
||||
#import "SOGoACLAdvisory.h"
|
||||
|
||||
@interface SOGoACLEnglishAdditionAdvisory : SOGoACLAdvisory
|
||||
@end
|
||||
|
||||
#endif /* SOGOACLFRENCHADDITIONADVISORY_H */
|
||||
@@ -1,31 +0,0 @@
|
||||
/* SOGoACLEnglishRemovalAdvisory.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 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 SOGOACLENGLISHREMOVALADVISORY_H
|
||||
#define SOGOACLENGLISHREMOVALADVISORY_H
|
||||
|
||||
#import "SOGoACLAdvisory.h"
|
||||
|
||||
@interface SOGoACLEnglishRemovalAdvisory : SOGoACLAdvisory
|
||||
@end
|
||||
|
||||
#endif /* SOGOACLENGLISHREMOVALADVISORY_H */
|
||||
@@ -1,31 +0,0 @@
|
||||
/* SOGoACLFrenchAdditionAdvisory.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 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 SOGOACLFRENCHADDITIONADVISORY_H
|
||||
#define SOGOACLFRENCHADDITIONADVISORY_H
|
||||
|
||||
#import "SOGoACLAdvisory.h"
|
||||
|
||||
@interface SOGoACLFrenchAdditionAdvisory : SOGoACLAdvisory
|
||||
@end
|
||||
|
||||
#endif /* SOGOACLFRENCHADDITIONADVISORY_H */
|
||||
@@ -1,27 +0,0 @@
|
||||
/* SOGoACLFrenchAdditionAdvisory.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 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 "SOGoACLFrenchAdditionAdvisory.h"
|
||||
|
||||
@implementation SOGoACLFrenchAdditionAdvisory
|
||||
|
||||
@end
|
||||
@@ -1,31 +0,0 @@
|
||||
/* SOGoACLFrenchRemovalAdvisory.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 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 SOGOACLFRENCHREMOVALADVISORY_H
|
||||
#define SOGOACLFRENCHREMOVALADVISORY_H
|
||||
|
||||
#import "SOGoACLAdvisory.h"
|
||||
|
||||
@interface SOGoACLFrenchRemovalAdvisory : SOGoACLAdvisory
|
||||
@end
|
||||
|
||||
#endif /* SOGOACLFRENCHREMOVALADVISORY_H */
|
||||
@@ -1,27 +0,0 @@
|
||||
/* SOGoACLFrenchRemovalAdvisory.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 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 "SOGoACLFrenchRemovalAdvisory.h"
|
||||
|
||||
@implementation SOGoACLFrenchRemovalAdvisory
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,68 @@
|
||||
/* SOGoFolderAdvisory.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 Inverse groupe conseil
|
||||
*
|
||||
* Author: Ludovic Marcotte <ludovic@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 SOGOFOLDERADVISORY_H
|
||||
#define SOGOFOLDERADVISORY_H
|
||||
|
||||
#import "UIxComponent.h"
|
||||
#import "../../SoObjects/SOGo/SOGoFolder.h"
|
||||
|
||||
@interface SOGoFolderAdvisory : UIxComponent
|
||||
{
|
||||
NSString *recipientUID;
|
||||
SOGoFolder *folderObject;
|
||||
BOOL isSubject;
|
||||
BOOL isBody;
|
||||
}
|
||||
|
||||
- (void) setFolderObject: (SOGoFolder *) theFolder;
|
||||
- (void) setRecipientUID: (NSString *) newRecipientUID;
|
||||
- (void) send;
|
||||
|
||||
- (BOOL) isSubject;
|
||||
- (BOOL) isBody;
|
||||
|
||||
- (NSString *) subject;
|
||||
- (NSString *) body;
|
||||
- (NSString *) folderMethod;
|
||||
|
||||
@end
|
||||
|
||||
@interface SOGoFolderEnglishAdditionAdvisory : SOGoFolderAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoFolderEnglishRemovalAdvisory : SOGoFolderAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoFolderFrenchAdditionAdvisory : SOGoFolderAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoFolderFrenchRemovalAdvisory : SOGoFolderAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoFolderGermanAdditionAdvisory : SOGoFolderAdvisory
|
||||
@end
|
||||
|
||||
@interface SOGoFolderGermanRemovalAdvisory : SOGoFolderAdvisory
|
||||
@end
|
||||
|
||||
#endif /* SOGOFOLDERADVISORY_H */
|
||||
@@ -0,0 +1,232 @@
|
||||
/* SOGoFolderAdvisory.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 Inverse groupe conseil
|
||||
*
|
||||
* Author: Ludovic Marcotte <ludovic@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/NSURL.h>
|
||||
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGExtensions/NGHashMap.h>
|
||||
#import <NGMail/NGMimeMessage.h>
|
||||
#import <NGMime/NGMimeBodyPart.h>
|
||||
#import <NGMime/NGMimeMultipartBody.h>
|
||||
|
||||
#import <SoObjects/SOGo/SOGoMailer.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoObject.h>
|
||||
#import <SoObjects/SOGo/LDAPUserManager.h>
|
||||
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
|
||||
#import "SOGoFolderAdvisory.h"
|
||||
|
||||
@implementation SOGoFolderAdvisory
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
recipientUID = nil;
|
||||
folderObject = nil;
|
||||
isSubject = NO;
|
||||
isBody = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[recipientUID release];
|
||||
[folderObject release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setFolderObject: (SOGoFolder *) theFolder
|
||||
{
|
||||
ASSIGN(folderObject, theFolder);
|
||||
}
|
||||
|
||||
- (void) setRecipientUID: (NSString *) newRecipientUID
|
||||
{
|
||||
ASSIGN (recipientUID, newRecipientUID);
|
||||
}
|
||||
|
||||
- (BOOL) isSubject
|
||||
{
|
||||
return isSubject;
|
||||
}
|
||||
|
||||
- (BOOL) isBody
|
||||
{
|
||||
return isBody;
|
||||
}
|
||||
|
||||
- (NSString *) displayName
|
||||
{
|
||||
return [folderObject displayName];
|
||||
}
|
||||
|
||||
- (NSString *) httpFolderURL
|
||||
{
|
||||
NSString *absoluteString;
|
||||
NSMutableString *url;
|
||||
|
||||
#warning the url returned by SOGoMail may be empty, we need to handle that
|
||||
absoluteString = [[folderObject soURL] absoluteString];
|
||||
url = [NSMutableString stringWithString: absoluteString];
|
||||
|
||||
if (![url hasSuffix: @"/"])
|
||||
[url appendString: @"/"];
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
- (NSString *) subject
|
||||
{
|
||||
NSString *subject;
|
||||
|
||||
isSubject = YES;
|
||||
subject = [[self generateResponse] contentAsString];
|
||||
isSubject = NO;
|
||||
|
||||
return [[subject stringByTrimmingSpaces] asQPSubjectString: @"utf-8"];
|
||||
}
|
||||
|
||||
- (NSString *) body
|
||||
{
|
||||
NSString *body;
|
||||
|
||||
isBody = YES;
|
||||
body = [[self generateResponse] contentAsString];
|
||||
isBody = NO;
|
||||
|
||||
return [body stringByTrimmingSpaces];
|
||||
}
|
||||
|
||||
- (NSString *) folderMethod
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NGMimeBodyPart *) _textPart
|
||||
{
|
||||
NGMutableHashMap *headerMap;
|
||||
NGMimeBodyPart *part;
|
||||
NSData *body;
|
||||
|
||||
headerMap = [NGMutableHashMap hashMapWithCapacity: 1];
|
||||
[headerMap setObject: @"text/plain; charset=utf-8" forKey: @"content-type"];
|
||||
|
||||
part = [NGMimeBodyPart bodyPartWithHeader: headerMap];
|
||||
body = [[self body] dataUsingEncoding: NSUTF8StringEncoding];
|
||||
[part setBody: [self body]];
|
||||
|
||||
return part;
|
||||
}
|
||||
|
||||
- (NGMimeBodyPart *) _sogoNotificationPart
|
||||
{
|
||||
NGMutableHashMap *headerMap;
|
||||
NGMimeBodyPart *part;
|
||||
NSData *body;
|
||||
|
||||
/* calendar part */
|
||||
headerMap = [NGMutableHashMap hashMapWithCapacity: 1];
|
||||
[headerMap setObject: [NSString stringWithFormat:
|
||||
@"%@; method=%@; type=%@; charset=%@",
|
||||
@"application/x-sogo-notification",
|
||||
[self folderMethod], [folderObject folderType],
|
||||
@"utf-8"]
|
||||
forKey: @"content-type"];
|
||||
|
||||
part = [NGMimeBodyPart bodyPartWithHeader: headerMap];
|
||||
body = [[self httpFolderURL] dataUsingEncoding: NSUTF8StringEncoding];
|
||||
[part setBody: body];
|
||||
|
||||
return part;
|
||||
}
|
||||
|
||||
- (void) send
|
||||
{
|
||||
NSString *recipient, *date;
|
||||
NGMutableHashMap *headerMap;
|
||||
NGMimeMessage *message;
|
||||
NGMimeMultipartBody *body;
|
||||
SOGoUser *activeUser;
|
||||
NSDictionary *identity;
|
||||
NSString *from, *fullMail;
|
||||
|
||||
activeUser = [context activeUser];
|
||||
identity = [activeUser primaryIdentity];
|
||||
from = [identity objectForKey: @"email"];
|
||||
fullMail = [NSString stringWithFormat: @"%@ <%@>",
|
||||
[identity objectForKey: @"fullName"], from];
|
||||
|
||||
recipient = [[LDAPUserManager sharedUserManager]
|
||||
getFullEmailForUID: recipientUID];
|
||||
|
||||
headerMap = [NGMutableHashMap hashMapWithCapacity: 5];
|
||||
[headerMap setObject: @"multipart/alternative" forKey: @"content-type"];
|
||||
[headerMap setObject: fullMail forKey: @"From"];
|
||||
[headerMap setObject: recipient forKey: @"To"];
|
||||
date = [[NSCalendarDate date] rfc822DateString];
|
||||
[headerMap setObject: date forKey: @"Date"];
|
||||
[headerMap setObject: [self subject] forKey: @"Subject"];
|
||||
message = [NGMimeMessage messageWithHeader: headerMap];
|
||||
|
||||
body = [[NGMimeMultipartBody alloc] initWithPart: message];
|
||||
[body addBodyPart: [self _textPart]];
|
||||
[body addBodyPart: [self _sogoNotificationPart]];
|
||||
[message setBody: body];
|
||||
[body release];
|
||||
|
||||
[[SOGoMailer sharedMailer] sendMimePart: message
|
||||
toRecipients: [NSArray arrayWithObject: recipient]
|
||||
sender: from];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation SOGoFolderEnglishAdditionAdvisory
|
||||
- (NSString *) folderMethod { return @"add"; }
|
||||
@end
|
||||
|
||||
@implementation SOGoFolderEnglishRemovalAdvisory
|
||||
- (NSString *) folderMethod { return @"remove"; }
|
||||
@end
|
||||
|
||||
@implementation SOGoFolderFrenchAdditionAdvisory
|
||||
- (NSString *) folderMethod { return @"add"; }
|
||||
@end
|
||||
|
||||
@implementation SOGoFolderFrenchRemovalAdvisory
|
||||
- (NSString *) folderMethod { return @"remove"; }
|
||||
@end
|
||||
|
||||
@implementation SOGoFolderGermanAdditionAdvisory
|
||||
- (NSString *) folderMethod { return @"add"; }
|
||||
@end
|
||||
|
||||
@implementation SOGoFolderGermanRemovalAdvisory
|
||||
- (NSString *) folderMethod { return @"remove"; }
|
||||
@end
|
||||
@@ -68,26 +68,25 @@
|
||||
/* date selection */
|
||||
- (NSCalendarDate *) selectedDate;
|
||||
|
||||
- (NSString *)dateStringForDate:(NSCalendarDate *)_date;
|
||||
- (NSString *) dateStringForDate: (NSCalendarDate *)_date;
|
||||
|
||||
- (BOOL) hideFrame;
|
||||
|
||||
- (UIxComponent *) jsCloseWithRefreshMethod: (NSString *) methodName;
|
||||
|
||||
/* SoUser */
|
||||
- (SoUser *)user;
|
||||
- (NSString *)shortUserNameForDisplay;
|
||||
- (NSString *) shortUserNameForDisplay;
|
||||
|
||||
/* labels */
|
||||
- (NSString *)labelForKey:(NSString *)_key;
|
||||
- (NSString *) labelForKey:(NSString *)_key;
|
||||
|
||||
- (NSString *)localizedNameForDayOfWeek:(unsigned)_dayOfWeek;
|
||||
- (NSString *)localizedAbbreviatedNameForDayOfWeek:(unsigned)_dayOfWeek;
|
||||
- (NSString *)localizedNameForMonthOfYear:(unsigned)_monthOfYear;
|
||||
- (NSString *)localizedAbbreviatedNameForMonthOfYear:(unsigned)_monthOfYear;
|
||||
- (NSString *) localizedNameForDayOfWeek:(unsigned)_dayOfWeek;
|
||||
- (NSString *) localizedAbbreviatedNameForDayOfWeek:(unsigned)_dayOfWeek;
|
||||
- (NSString *) localizedNameForMonthOfYear:(unsigned)_monthOfYear;
|
||||
- (NSString *) localizedAbbreviatedNameForMonthOfYear:(unsigned)_monthOfYear;
|
||||
|
||||
/* HTTP method safety */
|
||||
- (BOOL)isInvokedBySafeMethod;
|
||||
- (BOOL) isInvokedBySafeMethod;
|
||||
|
||||
/* locale */
|
||||
- (NSDictionary *)locale;
|
||||
@@ -96,6 +95,8 @@
|
||||
- (WOResourceManager *) pageResourceManager;
|
||||
- (NSString *) urlForResourceFilename: (NSString *) filename;
|
||||
|
||||
- (WOResponse *) responseWith204;
|
||||
|
||||
/* Debugging */
|
||||
- (BOOL)isUIxDebugEnabled;
|
||||
|
||||
|
||||
+45
-55
@@ -199,7 +199,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
|
||||
queryParameters = [[NSMutableDictionary alloc] initWithCapacity:8];
|
||||
|
||||
req = [[self context] request];
|
||||
req = [context request];
|
||||
uri = [req uri];
|
||||
r = [uri rangeOfString:@"?" options:NSBackwardsSearch];
|
||||
if (r.length > 0)
|
||||
@@ -246,7 +246,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
qp = [self queryParameters];
|
||||
if ([qp count] > 0)
|
||||
{
|
||||
ctx = [self context];
|
||||
ctx = context;
|
||||
qps = [ctx queryPathSeparator];
|
||||
[ctx setQueryPathSeparator: @"&"];
|
||||
qs = [ctx queryStringFromDictionary: qp];
|
||||
@@ -264,7 +264,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
NSString *uri;
|
||||
NSRange r;
|
||||
|
||||
uri = [[[self context] request] uri];
|
||||
uri = [[context request] uri];
|
||||
|
||||
/* first: cut off query parameters */
|
||||
|
||||
@@ -293,7 +293,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
SOGoObject *currentObject;
|
||||
BOOL found;
|
||||
|
||||
ctx = [self context];
|
||||
ctx = context;
|
||||
objects = [[ctx objectTraversalStack] objectEnumerator];
|
||||
currentObject = [objects nextObject];
|
||||
found = NO;
|
||||
@@ -312,28 +312,31 @@ static BOOL uixDebugEnabled = NO;
|
||||
SOGoObject *currentClient, *parent;
|
||||
BOOL found;
|
||||
Class objectClass, groupFolderClass, userFolderClass;
|
||||
WOContext *ctx;
|
||||
|
||||
groupFolderClass = [SOGoCustomGroupFolder class];
|
||||
userFolderClass = [SOGoUserFolder class];
|
||||
|
||||
currentClient = [self clientObject];
|
||||
objectClass = [currentClient class];
|
||||
found = (objectClass == groupFolderClass || objectClass == userFolderClass);
|
||||
while (!found && currentClient)
|
||||
if (currentClient
|
||||
&& [currentClient isKindOfClass: [SOGoObject class]])
|
||||
{
|
||||
parent = [currentClient container];
|
||||
objectClass = [parent class];
|
||||
if (objectClass == groupFolderClass
|
||||
|| objectClass == userFolderClass)
|
||||
found = YES;
|
||||
else
|
||||
currentClient = parent;
|
||||
groupFolderClass = [SOGoCustomGroupFolder class];
|
||||
userFolderClass = [SOGoUserFolder class];
|
||||
|
||||
objectClass = [currentClient class];
|
||||
found = (objectClass == groupFolderClass || objectClass == userFolderClass);
|
||||
while (!found && currentClient)
|
||||
{
|
||||
parent = [currentClient container];
|
||||
objectClass = [parent class];
|
||||
if (objectClass == groupFolderClass
|
||||
|| objectClass == userFolderClass)
|
||||
found = YES;
|
||||
else
|
||||
currentClient = parent;
|
||||
}
|
||||
}
|
||||
else
|
||||
currentClient = [WOApplication application];
|
||||
|
||||
ctx = [self context];
|
||||
|
||||
return [[currentClient baseURLInContext:ctx] hostlessURL];
|
||||
return [[currentClient baseURLInContext: context] hostlessURL];
|
||||
}
|
||||
|
||||
- (NSString *) resourcesPath
|
||||
@@ -351,7 +354,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
NSString *uri;
|
||||
NSRange r;
|
||||
|
||||
uri = [[[self context] request] uri];
|
||||
uri = [[context request] uri];
|
||||
|
||||
/* first: cut off query parameters */
|
||||
|
||||
@@ -397,7 +400,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
userTimeZone = [[context activeUser] timeZone];
|
||||
[_date setTimeZone: userTimeZone];
|
||||
|
||||
return [_date descriptionWithCalendarFormat:@"%Y%m%d"];
|
||||
return [_date descriptionWithCalendarFormat: @"%Y%m%d"];
|
||||
}
|
||||
|
||||
- (BOOL) hideFrame
|
||||
@@ -418,35 +421,12 @@ static BOOL uixDebugEnabled = NO;
|
||||
|
||||
/* SoUser */
|
||||
|
||||
- (SoUser *) user
|
||||
{
|
||||
WOContext *ctx;
|
||||
|
||||
ctx = [self context];
|
||||
|
||||
return [[[self clientObject] authenticatorInContext: ctx] userInContext: ctx];
|
||||
}
|
||||
|
||||
- (NSString *) shortUserNameForDisplay
|
||||
{
|
||||
// TODO: better use a SoUser formatter?
|
||||
// TODO: who calls that?
|
||||
NSString *s;
|
||||
NSRange r;
|
||||
|
||||
// TODO: USE USER MANAGER INSTEAD!
|
||||
|
||||
s = [[self user] login];
|
||||
if ([s length] < 10)
|
||||
return s;
|
||||
|
||||
// TODO: algorithm might be inappropriate, depends on the actual UID
|
||||
|
||||
r = [s rangeOfString:@"."];
|
||||
if (r.length == 0)
|
||||
return s;
|
||||
|
||||
return [s substringToIndex:r.location];
|
||||
if ([context activeUser] == nil)
|
||||
return @"wrongusernamepassword";
|
||||
|
||||
return [[context activeUser] login];
|
||||
}
|
||||
|
||||
/* labels */
|
||||
@@ -463,7 +443,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
|
||||
/* lookup languages */
|
||||
|
||||
languages = [[self context] resourceLookupLanguages];
|
||||
languages = [context resourceLookupLanguages];
|
||||
|
||||
/* find resource manager */
|
||||
|
||||
@@ -530,7 +510,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
// TODO: move to WORequest?
|
||||
NSString *m;
|
||||
|
||||
m = [[[self context] request] method];
|
||||
m = [[context request] method];
|
||||
if ([m isEqualToString:@"GET"]) return YES;
|
||||
if ([m isEqualToString:@"HEAD"]) return YES;
|
||||
return NO;
|
||||
@@ -547,7 +527,7 @@ static BOOL uixDebugEnabled = NO;
|
||||
{
|
||||
WOResourceManager *rm;
|
||||
|
||||
if ((rm = [[[self context] page] resourceManager]) == nil)
|
||||
if ((rm = [[context page] resourceManager]) == nil)
|
||||
rm = [[WOApplication application] resourceManager];
|
||||
|
||||
return rm;
|
||||
@@ -570,12 +550,12 @@ static BOOL uixDebugEnabled = NO;
|
||||
if (!url)
|
||||
{
|
||||
rm = [self pageResourceManager];
|
||||
page = [[self context] page];
|
||||
page = [context page];
|
||||
pageBundle = [NSBundle bundleForClass: [page class]];
|
||||
url = [rm urlForResourceNamed: filename
|
||||
inFramework: [pageBundle bundlePath]
|
||||
languages: nil
|
||||
request: [[self context] request]];
|
||||
request: [context request]];
|
||||
if (!url)
|
||||
url = @"";
|
||||
else
|
||||
@@ -592,6 +572,16 @@ static BOOL uixDebugEnabled = NO;
|
||||
return url;
|
||||
}
|
||||
|
||||
- (WOResponse *) responseWith204
|
||||
{
|
||||
WOResponse *response;
|
||||
|
||||
response = [context response];
|
||||
[response setStatus: 204];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/* debugging */
|
||||
|
||||
- (BOOL)isUIxDebugEnabled {
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
/* Tooltips */
|
||||
|
||||
"Create a new event" = "Create a new event";
|
||||
"Create a new task" = "Create a new task";
|
||||
"Edit this event or task" = "Edit this event or task";
|
||||
"Delete this event or task" = "Delete this event or task";
|
||||
"Go to today" = "Go to today";
|
||||
"Switch to day view" = "Switch to day view";
|
||||
"Switch to week view" = "Switch to week view";
|
||||
"Switch to month view" = "Switch to month view";
|
||||
|
||||
/* Day */
|
||||
|
||||
"Sunday" = "Sunday";
|
||||
@@ -99,8 +110,11 @@
|
||||
|
||||
/* Button Titles */
|
||||
|
||||
"Add..." = "Add...";
|
||||
"Remove" = "Remove";
|
||||
"New Calendar..." = "New Calendar...";
|
||||
"Subscribe to a Calendar..." = "Subscribe to a Calendar...";
|
||||
"Remove the selected Calendar" = "Remove the selected Calendar";
|
||||
|
||||
"Name of the Calendar" = "Name of the Calendar";
|
||||
|
||||
"new" = "New";
|
||||
"printview" = "Print View";
|
||||
@@ -365,6 +379,9 @@ validate_endbeforestart = "Enddate is before startdate!";
|
||||
"eventDeleteConfirmation" = "Erasing this event will be permanent.\\nWould you like to continue?";
|
||||
"taskDeleteConfirmation" = "Erasing this task will be permanent.\\nWould you like to continue?";
|
||||
|
||||
"Are you sure you want to delete the selected calendar?"
|
||||
= "Are you sure you want to delete the selected calendar?";
|
||||
|
||||
/* Legend */
|
||||
"Required participant" = "Required participant";
|
||||
"Optional participant" = "Optional participant";
|
||||
@@ -393,5 +410,5 @@ validate_endbeforestart = "Enddate is before startdate!";
|
||||
"Location" = "Location";
|
||||
"(Private Event)" = "(Private Event)";
|
||||
|
||||
"closeThisWindowMessage" = "Thank you! You may now close this window.";
|
||||
"closeThisWindowMessage" = "Thank you! You may now close this window or view your ";
|
||||
"Multicolumn Day View" = "Multicolumn Day View";
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
/* Tooltips */
|
||||
|
||||
"Create a new event" = "Créer un nouvel événement";
|
||||
"Create a new task" = "Créer une nouvelle tâche";
|
||||
"Edit this event or task" = "Modifier l'événement ou la tâche sélectionnée";
|
||||
"Delete this event or task" = "Supprimer l'événement ou la tâche sélectionnée";
|
||||
"Go to today" = "Aller à la journée d'aujourd'hui";
|
||||
"Switch to day view" = "Passer à la vue par jour";
|
||||
"Switch to week view" = "Passer à la vue par semaine";
|
||||
"Switch to month view" = "Passer à la vue par mois";
|
||||
|
||||
/* Day */
|
||||
|
||||
"Sunday" = "Dimanche";
|
||||
@@ -100,8 +111,11 @@
|
||||
|
||||
/* Button Titles */
|
||||
|
||||
"Add..." = "Ajouter...";
|
||||
"Remove" = "Enlever";
|
||||
"New Calendar..." = "Nouvel agenda...";
|
||||
"Subscribe to a Calendar..." = "S'inscrire à un agenda...";
|
||||
"Remove the selected Calendar" = "Enlever l'agenda sélectionné";
|
||||
|
||||
"Name of the Calendar" = "Nom de l'agenda";
|
||||
|
||||
"new" = "Nouveau";
|
||||
"printview" = "Version imprimable";
|
||||
@@ -363,6 +377,9 @@ validate_endbeforestart = "La date de fin est avant la date de début !";
|
||||
"eventDeleteConfirmation" = "L'effacement de cet événement sera permanent.\\nVoulez-vous continuer?";
|
||||
"taskDeleteConfirmation" = "L'effacement de cette tâche sera permanent.\\nVoulez-vous continuer?";
|
||||
|
||||
"Are you sure you want to delete the selected calendar?"
|
||||
= "Voulez-vous vraiment supprimer l'agenda sélectionné ?";
|
||||
|
||||
/* Legend */
|
||||
"Required participant" = "Participant obligatoire";
|
||||
"Optional participant" = "Participant facultatif";
|
||||
@@ -392,5 +409,5 @@ validate_endbeforestart = "La date de fin est avant la date de début !";
|
||||
"Location" = "Lieu";
|
||||
"(Private Event)" = "(Événement privé)";
|
||||
|
||||
"closeThisWindowMessage" = "Merci! Vous pouvez maintenant fermer cette fenêtre.";
|
||||
"closeThisWindowMessage" = "Merci! Vous pouvez maintenant fermer cette fenêtre ou consulter votre ";
|
||||
"Multicolumn Day View" = "Multicolonne";
|
||||
|
||||
@@ -48,7 +48,7 @@ SchedulerUI_RESOURCE_FILES += \
|
||||
product.plist
|
||||
|
||||
SchedulerUI_RESOURCE_FILES += \
|
||||
Toolbars/SOGoAppointmentFolder.toolbar \
|
||||
Toolbars/SOGoAppointmentFolders.toolbar \
|
||||
Toolbars/SOGoAppointmentObject.toolbar \
|
||||
Toolbars/SOGoAppointmentObjectAccept.toolbar \
|
||||
Toolbars/SOGoAppointmentObjectDecline.toolbar \
|
||||
@@ -66,6 +66,9 @@ SchedulerUI_RESOURCE_FILES += \
|
||||
|
||||
# make
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/sope-gdl1/
|
||||
ADDITIONAL_LIB_DIRS += -L../../SOPE/sope-gdl1/GDLContentStore/obj/
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
"New Calendar..." = "Neuer Kalender...";
|
||||
"Delete Calendar" = "Kalender löschen";
|
||||
"Sharing..." = "Partage...";
|
||||
"Sharing..." = "Benutzerrechte...";
|
||||
"Export Calendar..." = "Kalender exportieren...";
|
||||
"Publish Calendar..." = "Kalender publizieren...";
|
||||
"Reload Remote Calendars" = "Externe Kalender neu laden";
|
||||
@@ -83,27 +83,30 @@
|
||||
"Forbidden" = "Accès non autorisée";
|
||||
|
||||
/* acls */
|
||||
"Default Roles" = "Rôles par défaut";
|
||||
"User rights for:" = "Autorisations pour :";
|
||||
"Default Roles" = "Standard-Rollen";
|
||||
"User rights for:" = "Benutzerrechte für:";
|
||||
"label_Public" = "Öffentlich";
|
||||
"label_Private" = "Privat";
|
||||
"label_Confidential" = "Vertraulich";
|
||||
"View All" = "Voir tout";
|
||||
"View the Date & Time" = "Voir la date & l'heure";
|
||||
"Modify" = "Modifier";
|
||||
"Respond To" = "Répondre";
|
||||
"None" = "Aucun";
|
||||
"View All" = "Alles sehen";
|
||||
"View the Date & Time" = "Datum & Uhrzeit sehen";
|
||||
"Modify" = "Ändern";
|
||||
"Respond To" = "Antworten";
|
||||
"None" = "Keine";
|
||||
"This person can create objects in my calendar."
|
||||
= "Cette personne peut ajouter des objets à mon agenda.";
|
||||
= "Diese Person kann Termine in meinem Kalender hinzufügen.";
|
||||
"This person can erase objects from my calendar."
|
||||
= "Cette personne peut effacer des objets de mon agenda.";
|
||||
= "Diese Person kann Termine in meinem Kalender löschen.";
|
||||
|
||||
/* Button Titles */
|
||||
|
||||
"Add..." = "Ajouter...";
|
||||
"Remove" = "Enlever";
|
||||
"New Calendar..." = "New Calendar...";
|
||||
"Subscribe to a Calendar..." = "Subscribe to a Calendar...";
|
||||
"Remove the selected Calendar" = "Remove the selected Calendar";
|
||||
|
||||
"new" = "Nouveau";
|
||||
"Name of the Calendar" = "Name of the Calendar";
|
||||
|
||||
"new" = "Neu";
|
||||
"printview" = "Version imprimable";
|
||||
"edit" = "Bearbeiten";
|
||||
"delete" = "Löschen";
|
||||
@@ -112,7 +115,7 @@
|
||||
"Close" = "Schließen";
|
||||
"Invite Attendees" = "Teilnehmer";
|
||||
"Documents" = "Dokumente";
|
||||
"Update" = "Mettre à jour";
|
||||
"Update" = "Speichern";
|
||||
"Cancel" = "Abbrechen";
|
||||
"show_rejected_apts" = "Afficher les rendez-vous refusés";
|
||||
"hide_rejected_apts" = "Cacher les rendez-vous refusés";
|
||||
@@ -363,6 +366,9 @@ validate_endbeforestart = "Ihr Beginn ist nach dem Ende";
|
||||
"eventDeleteConfirmation" = "L'effacement de cet événement sera permanent.\\nVoulez-vous continuer?";
|
||||
"taskDeleteConfirmation" = "L'effacement de cette tâche sera permanent.\\nVoulez-vous continuer?";
|
||||
|
||||
"Are you sure you want to delete the selected calendar?"
|
||||
= "Are you sure you want to delete the selected calendar?";
|
||||
|
||||
/* Legend */
|
||||
"Required participant" = "Participant obligatoire";
|
||||
"Optional participant" = "Participant facultatif";
|
||||
|
||||
+18
-9
@@ -3,39 +3,48 @@
|
||||
isSafe = NO;
|
||||
label = "New Event";
|
||||
onclick = "return newEvent(this, 'event');";
|
||||
image = "new-event.png"; },
|
||||
image = "new-event.png";
|
||||
tooltip = "Create a new event"; },
|
||||
{ link = "new_task";
|
||||
label="New Task";
|
||||
image = "new-task.png";
|
||||
onclick = "return newEvent(this, 'task');";
|
||||
image = "new-task.png"; },
|
||||
image = "new-task.png";
|
||||
tooltip = "Create a new task"; },
|
||||
{ link = "edit";
|
||||
label="Edit";
|
||||
onclick = "return editEvent(this);";
|
||||
image = "edit.png"; },
|
||||
image = "edit.png";
|
||||
tooltip = "Edit this event or task"; },
|
||||
{ link = "delete";
|
||||
label="Delete";
|
||||
onclick = "return deleteEvent(this);";
|
||||
image = "delete.png"; } ),
|
||||
image = "delete.png";
|
||||
tooltip = "Delete this event or task"; } ),
|
||||
( { link = "today";
|
||||
label="Go to Today";
|
||||
onclick = "return gotoToday();";
|
||||
image = "goto-today.png" } ),
|
||||
image = "goto-today.png";
|
||||
tooltip = "Go to today"; } ),
|
||||
( { link = "dayoverview";
|
||||
label="Day View";
|
||||
onclick = "return onDayOverview();";
|
||||
image = "day-view.png"; },
|
||||
image = "day-view.png";
|
||||
tooltip = "Switch to day view"; },
|
||||
/* disabled until we fix the view */
|
||||
/* { link = "dayoverview";
|
||||
label="Multicolumn Day View";
|
||||
onclick = "return onMulticolumnDayOverview();";
|
||||
image = "day-view-multicolumn.png"; }, */
|
||||
image = "day-view-multicolumn.png";
|
||||
tooltip = ""; }, */
|
||||
{ link = "weekoverview";
|
||||
label="Week View";
|
||||
onclick = "return onWeekOverview();";
|
||||
image = "week-view.png"; },
|
||||
image = "week-view.png";
|
||||
tooltip = "Switch to week view"; },
|
||||
{ link = "monthoverview";
|
||||
label="Month View";
|
||||
onclick = "return onMonthOverview();";
|
||||
image = "month-view.png"; } )
|
||||
image = "month-view.png";
|
||||
tooltip = "Switch to month view"; } )
|
||||
)
|
||||
@@ -35,6 +35,7 @@
|
||||
NSCalendarDate *aptStartDate;
|
||||
NSCalendarDate *aptEndDate;
|
||||
NSString *item;
|
||||
NSString *repeat;
|
||||
}
|
||||
|
||||
/* template values */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#import <NGCards/iCalEvent.h>
|
||||
#import <NGCards/iCalPerson.h>
|
||||
#import <NGCards/iCalRecurrenceRule.h>
|
||||
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoContentObject.h>
|
||||
@@ -48,12 +49,22 @@
|
||||
aptEndDate = nil;
|
||||
item = nil;
|
||||
event = nil;
|
||||
repeat = nil;
|
||||
isAllDay = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[item release];
|
||||
[repeat release];
|
||||
[aptStartDate release];
|
||||
[aptEndDate release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* template values */
|
||||
- (iCalEvent *) event
|
||||
{
|
||||
@@ -137,7 +148,7 @@
|
||||
|
||||
- (void) setItem: (NSString *) newItem
|
||||
{
|
||||
item = newItem;
|
||||
ASSIGN (item, newItem);
|
||||
}
|
||||
|
||||
- (NSString *) item
|
||||
@@ -184,6 +195,15 @@
|
||||
// return reminder;
|
||||
// }
|
||||
|
||||
- (NSString *) reminder
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
- (void) setReminder: (NSString *) newReminder
|
||||
{
|
||||
}
|
||||
|
||||
- (NSString *) itemReminderText
|
||||
{
|
||||
NSString *text;
|
||||
@@ -198,20 +218,12 @@
|
||||
|
||||
- (NSString *) repeat
|
||||
{
|
||||
return @"";
|
||||
return repeat;
|
||||
}
|
||||
|
||||
- (void) setRepeat: (NSString *) newRepeat
|
||||
{
|
||||
}
|
||||
|
||||
- (NSString *) reminder
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
- (void) setReminder: (NSString *) newReminder
|
||||
{
|
||||
ASSIGN (repeat, newRepeat);
|
||||
}
|
||||
|
||||
/* actions */
|
||||
@@ -249,6 +261,7 @@
|
||||
NSCalendarDate *startDate, *endDate;
|
||||
NSString *duration;
|
||||
unsigned int minutes;
|
||||
iCalRecurrenceRule *rule;
|
||||
|
||||
event = (iCalEvent *) [[self clientObject] component: NO];
|
||||
if (event)
|
||||
@@ -276,8 +289,40 @@
|
||||
ASSIGN (aptStartDate, startDate);
|
||||
ASSIGN (aptEndDate, endDate);
|
||||
|
||||
// We initialize our repeat ivars
|
||||
if ([event hasRecurrenceRules])
|
||||
{
|
||||
repeat = @"CUSTOM";
|
||||
|
||||
/* here comes the code for initializing repeat, reminder and isAllDay... */
|
||||
rule = [[event recurrenceRules] lastObject];
|
||||
|
||||
if ([rule frequency] == iCalRecurrenceFrequenceWeekly)
|
||||
{
|
||||
if ([rule repeatInterval] == 1)
|
||||
repeat = @"WEEKLY";
|
||||
else if ([rule repeatInterval] == 2)
|
||||
repeat = @"BI-WEEKLY";
|
||||
}
|
||||
else if ([rule frequency] == iCalRecurrenceFrequenceDaily)
|
||||
{
|
||||
if ([rule byDayMask] == (iCalWeekDayMonday
|
||||
| iCalWeekDayTuesday
|
||||
| iCalWeekDayWednesday
|
||||
| iCalWeekDayThursday
|
||||
| iCalWeekDayFriday))
|
||||
repeat = @"EVERY WEEKDAY";
|
||||
else if (![rule byDayMask])
|
||||
repeat = @"DAILY";
|
||||
}
|
||||
else if ([rule frequency] == iCalRecurrenceFrequenceMonthly
|
||||
&& [rule repeatInterval] == 1)
|
||||
repeat = @"MONTHLY";
|
||||
else if ([rule frequency] == iCalRecurrenceFrequenceYearly
|
||||
&& [rule repeatInterval] == 1)
|
||||
repeat = @"YEARLY";
|
||||
}
|
||||
else
|
||||
DESTROY(repeat);
|
||||
|
||||
return self;
|
||||
}
|
||||
@@ -286,14 +331,14 @@
|
||||
{
|
||||
NSString *objectId, *method, *uri;
|
||||
id <WOActionResults> result;
|
||||
Class clientKlazz;
|
||||
SOGoAppointmentFolder *co;
|
||||
|
||||
clientKlazz = [[self clientObject] class];
|
||||
objectId = [clientKlazz globallyUniqueObjectId];
|
||||
co = [self clientObject];
|
||||
objectId = [co globallyUniqueObjectId];
|
||||
if ([objectId length] > 0)
|
||||
{
|
||||
method = [NSString stringWithFormat:@"%@/Calendar/%@/editAsAppointment",
|
||||
[self userFolderPath], objectId];
|
||||
method = [NSString stringWithFormat:@"%@/%@/editAsAppointment",
|
||||
[co soURL], objectId];
|
||||
uri = [self completeHrefForMethod: method];
|
||||
result = [self redirectToLocation: uri];
|
||||
}
|
||||
@@ -310,7 +355,11 @@
|
||||
NSString *iCalString;
|
||||
|
||||
clientObject = [self clientObject];
|
||||
NSLog(@"saveAction, clientObject = %@", clientObject);
|
||||
|
||||
iCalString = [[clientObject calendar: NO] versitString];
|
||||
|
||||
NSLog(@"saveAction, iCalString = %@", iCalString);
|
||||
[clientObject saveContentString: iCalString];
|
||||
|
||||
return [self jsCloseWithRefreshMethod: @"refreshEventsAndDisplay()"];
|
||||
@@ -319,8 +368,12 @@
|
||||
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
|
||||
inContext: (WOContext*) context
|
||||
{
|
||||
NSString *actionName;
|
||||
|
||||
actionName = [[request requestHandlerPath] lastPathComponent];
|
||||
|
||||
return ([[self clientObject] isKindOfClass: [SOGoAppointmentObject class]]
|
||||
&& [[request method] isEqualToString: @"POST"]);
|
||||
&& [actionName hasPrefix: @"save"]);
|
||||
}
|
||||
|
||||
- (void) takeValuesFromRequest: (WORequest *) _rq
|
||||
@@ -328,6 +381,7 @@
|
||||
{
|
||||
SOGoAppointmentObject *clientObject;
|
||||
int nbrDays;
|
||||
iCalRecurrenceRule *rule;
|
||||
|
||||
clientObject = [self clientObject];
|
||||
event = (iCalEvent *) [clientObject component: YES];
|
||||
@@ -348,6 +402,36 @@
|
||||
}
|
||||
if ([clientObject isNew])
|
||||
[event setTransparency: @"OPAQUE"];
|
||||
|
||||
// We remove any repeat rules
|
||||
if (!repeat && [event hasRecurrenceRules])
|
||||
[event removeAllRecurrenceRules];
|
||||
else if (!([repeat caseInsensitiveCompare: @"-"] == NSOrderedSame
|
||||
|| [repeat caseInsensitiveCompare: @"CUSTOM"] == NSOrderedSame))
|
||||
{
|
||||
rule = [iCalRecurrenceRule new];
|
||||
|
||||
[rule setInterval: @"1"];
|
||||
if ([repeat caseInsensitiveCompare: @"BI-WEEKLY"] == NSOrderedSame)
|
||||
{
|
||||
[rule setFrequency: iCalRecurrenceFrequenceWeekly];
|
||||
[rule setInterval: @"2"];
|
||||
}
|
||||
else if ([repeat caseInsensitiveCompare: @"EVERY WEEKDAY"] == NSOrderedSame)
|
||||
{
|
||||
[rule setByDayMask: (iCalWeekDayMonday
|
||||
|iCalWeekDayTuesday
|
||||
|iCalWeekDayWednesday
|
||||
|iCalWeekDayThursday
|
||||
|iCalWeekDayFriday)];
|
||||
[rule setFrequency: iCalRecurrenceFrequenceDaily];
|
||||
}
|
||||
else
|
||||
[rule setFrequency:
|
||||
(iCalRecurrenceFrequency) [rule valueForFrequency: repeat]];
|
||||
[event setRecurrenceRules: [NSArray arrayWithObject: rule]];
|
||||
[rule release];
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: add tentatively
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSNull.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
@@ -38,6 +39,9 @@
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolders.h>
|
||||
|
||||
#import <UI/Common/WODirectAction+SOGo.h>
|
||||
|
||||
#import "NSArray+Scheduler.h"
|
||||
|
||||
@@ -212,87 +216,56 @@
|
||||
return aptFolder;
|
||||
}
|
||||
|
||||
- (NSArray *) _activeCalendarFolders
|
||||
{
|
||||
NSMutableArray *activeFolders;
|
||||
NSEnumerator *folders;
|
||||
NSDictionary *currentFolderDict;
|
||||
SOGoAppointmentFolder *currentFolder, *clientObject;
|
||||
|
||||
activeFolders = [NSMutableArray new];
|
||||
[activeFolders autorelease];
|
||||
|
||||
clientObject = [self clientObject];
|
||||
|
||||
folders = [[clientObject calendarFolders] objectEnumerator];
|
||||
currentFolderDict = [folders nextObject];
|
||||
while (currentFolderDict)
|
||||
{
|
||||
if ([[currentFolderDict objectForKey: @"active"] boolValue])
|
||||
{
|
||||
currentFolder
|
||||
= [self _aptFolder: [currentFolderDict objectForKey: @"folder"]
|
||||
withClientObject: clientObject];
|
||||
[activeFolders addObject: currentFolder];
|
||||
}
|
||||
|
||||
currentFolderDict = [folders nextObject];
|
||||
}
|
||||
|
||||
return activeFolders;
|
||||
}
|
||||
|
||||
- (NSArray *) _fetchFields: (NSArray *) fields
|
||||
forComponentOfType: (NSString *) component
|
||||
{
|
||||
NSEnumerator *folders, *currentInfos;
|
||||
SOGoAppointmentFolder *currentFolder;
|
||||
NSMutableDictionary *infos, *currentInfo, *newInfo;
|
||||
NSString *owner, *uid;
|
||||
NSMutableDictionary *newInfo;
|
||||
NSMutableArray *infos;
|
||||
NSNull *marker;
|
||||
SOGoAppointmentFolders *clientObject;
|
||||
|
||||
marker = [NSNull null];
|
||||
|
||||
infos = [NSMutableDictionary dictionary];
|
||||
folders = [[self _activeCalendarFolders] objectEnumerator];
|
||||
clientObject = [self clientObject];
|
||||
|
||||
folders = [[clientObject subFolders] objectEnumerator];
|
||||
currentFolder = [folders nextObject];
|
||||
|
||||
infos = [NSMutableArray array];
|
||||
while (currentFolder)
|
||||
{
|
||||
owner = [currentFolder ownerInContext: context];
|
||||
currentInfos = [[currentFolder fetchCoreInfosFrom: startDate
|
||||
to: endDate
|
||||
component: component] objectEnumerator];
|
||||
newInfo = [currentInfos nextObject];
|
||||
while (newInfo)
|
||||
if ([currentFolder isActive])
|
||||
{
|
||||
uid = [newInfo objectForKey: @"c_uid"];
|
||||
currentInfo = [infos objectForKey: uid];
|
||||
if (!currentInfo
|
||||
|| [owner isEqualToString: userLogin])
|
||||
currentInfos = [[currentFolder fetchCoreInfosFrom: startDate
|
||||
to: endDate
|
||||
component: component] objectEnumerator];
|
||||
|
||||
while ((newInfo = [currentInfos nextObject]))
|
||||
{
|
||||
[self _updatePrivacyInComponent: newInfo
|
||||
fromFolder: currentFolder];
|
||||
[newInfo setObject: owner forKey: @"c_owner"];
|
||||
[infos setObject: [newInfo objectsForKeys: fields
|
||||
notFoundMarker: marker]
|
||||
forKey: uid];
|
||||
[newInfo setObject: [currentFolder nameInContainer]
|
||||
forKey: @"c_folder"];
|
||||
|
||||
[infos addObject: [newInfo objectsForKeys: fields
|
||||
notFoundMarker: marker]];
|
||||
}
|
||||
newInfo = [currentInfos nextObject];
|
||||
}
|
||||
currentFolder = [folders nextObject];
|
||||
}
|
||||
|
||||
return [infos allValues];
|
||||
return infos;
|
||||
}
|
||||
|
||||
- (WOResponse *) _responseWithData: (NSArray *) data
|
||||
{
|
||||
WOResponse *response;
|
||||
|
||||
response = [context response];
|
||||
response = [self responseWithStatus: 200];
|
||||
[response setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
[response setStatus: 200];
|
||||
[response appendContentString: [data jsonRepresentation]];
|
||||
|
||||
return response;
|
||||
@@ -325,7 +298,7 @@
|
||||
[self _setupContext];
|
||||
|
||||
newEvents = [NSMutableArray array];
|
||||
fields = [NSArray arrayWithObjects: @"c_name", @"c_owner", @"c_status",
|
||||
fields = [NSArray arrayWithObjects: @"c_name", @"c_folder", @"c_status",
|
||||
@"c_title", @"c_startdate", @"c_enddate", @"c_location",
|
||||
@"c_isallday", nil];
|
||||
events = [[self _fetchFields: fields
|
||||
@@ -396,7 +369,7 @@
|
||||
|
||||
[self _setupContext];
|
||||
|
||||
fields = [NSArray arrayWithObjects: @"c_name", @"c_owner", @"c_status",
|
||||
fields = [NSArray arrayWithObjects: @"c_name", @"c_folder", @"c_status",
|
||||
@"c_title", @"c_enddate", nil];
|
||||
|
||||
tasks = [[self _fetchFields: fields
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
@@ -41,6 +42,15 @@ static NSMutableArray *yearMenuItems = nil;
|
||||
|
||||
@implementation UIxCalMainView
|
||||
|
||||
- (NSString *) userUTCOffset
|
||||
{
|
||||
NSTimeZone *userTZ;
|
||||
|
||||
userTZ = [[context activeUser] timeZone];
|
||||
|
||||
return [NSString stringWithFormat: @"%d", [userTZ secondsFromGMT]];
|
||||
}
|
||||
|
||||
- (NSArray *) monthMenuItems
|
||||
{
|
||||
unsigned int count;
|
||||
@@ -99,19 +109,4 @@ static NSMutableArray *yearMenuItems = nil;
|
||||
return yearMenuItem;
|
||||
}
|
||||
|
||||
- (id) batchDeleteAction
|
||||
{
|
||||
NSArray *ids;
|
||||
SOGoAppointmentFolder *clientObject;
|
||||
|
||||
ids = [[self queryParameterForKey: @"ids"] componentsSeparatedByString: @"/"];
|
||||
if (ids)
|
||||
{
|
||||
clientObject = [self clientObject];
|
||||
[clientObject deleteEntriesWithIds: ids];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -23,29 +23,23 @@
|
||||
#ifndef UIXCALENDARSELECTOR_H
|
||||
#define UIXCALENDARSELECTOR_H
|
||||
|
||||
#import <UI/SOGoUI/UIxComponent.h>
|
||||
|
||||
@class NSArray;
|
||||
@class NSMutableArray;
|
||||
@class NSDictionary;
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
@class iCalPerson;
|
||||
|
||||
@interface UIxCalendarSelector : UIxComponent
|
||||
{
|
||||
NSMutableDictionary *colors;
|
||||
|
||||
NSDictionary *currentCalendarFolder;
|
||||
NSString *currentCalendarLogin;
|
||||
NSMutableArray *calendars;
|
||||
NSDictionary *currentCalendar;
|
||||
}
|
||||
|
||||
- (NSArray *) calendarFolders;
|
||||
- (NSArray *) calendars;
|
||||
|
||||
- (void) setCurrentCalendarFolder: (NSDictionary *) newCurrentCalendarFolder;
|
||||
- (NSDictionary *) currentCalendarFolder;
|
||||
|
||||
- (NSString *) currentCalendarSpanBG;
|
||||
- (NSString *) currentCalendarLogin;
|
||||
- (NSString *) currentCalendarStyle;
|
||||
- (void) setCurrentCalendar: (NSDictionary *) newCalendar;
|
||||
- (NSDictionary *) currentCalendar;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -22,34 +22,30 @@
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGExtensions/NGExtensions.h>
|
||||
#import <NGCards/iCalPerson.h>
|
||||
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
#import <Appointments/SOGoAppointmentFolder.h>
|
||||
#import <Appointments/SOGoAppointmentFolders.h>
|
||||
|
||||
#import "UIxCalendarSelector.h"
|
||||
|
||||
static inline char
|
||||
darkenedColor (const char value)
|
||||
{
|
||||
char newValue;
|
||||
// static inline char
|
||||
// darkenedColor (const char value)
|
||||
// {
|
||||
// char newValue;
|
||||
|
||||
if (value >= '0' && value <= '9')
|
||||
newValue = ((value - '0') / 2) + '0';
|
||||
else if (value >= 'a' && value <= 'f')
|
||||
newValue = ((value + 10 - 'a') / 2) + '0';
|
||||
else if (value >= 'A' && value <= 'F')
|
||||
newValue = ((value + 10 - 'A') / 2) + '0';
|
||||
else
|
||||
newValue = value;
|
||||
// if (value >= '0' && value <= '9')
|
||||
// newValue = ((value - '0') / 2) + '0';
|
||||
// else if (value >= 'a' && value <= 'f')
|
||||
// newValue = ((value + 10 - 'a') / 2) + '0';
|
||||
// else if (value >= 'A' && value <= 'F')
|
||||
// newValue = ((value + 10 - 'A') / 2) + '0';
|
||||
// else
|
||||
// newValue = value;
|
||||
|
||||
return newValue;
|
||||
}
|
||||
// return newValue;
|
||||
// }
|
||||
|
||||
static inline NSString *
|
||||
colorForNumber (unsigned int number)
|
||||
@@ -90,8 +86,8 @@ colorForNumber (unsigned int number)
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
colors = nil;
|
||||
currentCalendarFolder = nil;
|
||||
calendars = nil;
|
||||
currentCalendar = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -99,76 +95,63 @@ colorForNumber (unsigned int number)
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[currentCalendarFolder release];
|
||||
[colors release];
|
||||
[calendars release];
|
||||
[currentCalendar release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSArray *) calendarFolders
|
||||
- (NSArray *) calendars
|
||||
{
|
||||
NSArray *calendarFolders;
|
||||
NSEnumerator *newFolders;
|
||||
NSDictionary *currentFolder;
|
||||
unsigned int count;
|
||||
NSArray *folders;
|
||||
SOGoAppointmentFolder *folder;
|
||||
NSMutableDictionary *calendar;
|
||||
unsigned int count, max;
|
||||
NSString *folderName;
|
||||
NSNumber *isActive;
|
||||
|
||||
calendarFolders = [[self clientObject] calendarFolders];
|
||||
if (!colors)
|
||||
if (!calendars)
|
||||
{
|
||||
colors = [NSMutableDictionary new];
|
||||
count = 0;
|
||||
newFolders = [calendarFolders objectEnumerator];
|
||||
currentFolder = [newFolders nextObject];
|
||||
while (currentFolder)
|
||||
folders = [[self clientObject] subFolders];
|
||||
max = [folders count];
|
||||
calendars = [[NSMutableArray alloc] initWithCapacity: max];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
[colors setObject: colorForNumber (count)
|
||||
forKey: [currentFolder objectForKey: @"folder"]];
|
||||
count++;
|
||||
currentFolder = [newFolders nextObject];
|
||||
folder = [folders objectAtIndex: count];
|
||||
calendar = [NSMutableDictionary dictionary];
|
||||
folderName = [folder nameInContainer];
|
||||
[calendar setObject:
|
||||
[NSString stringWithFormat: @"/%@", folderName]
|
||||
forKey: @"id"];
|
||||
[calendar setObject: [folder displayName]
|
||||
forKey: @"displayName"];
|
||||
[calendar setObject: folderName forKey: @"folder"];
|
||||
[calendar setObject: colorForNumber (count)
|
||||
forKey: @"color"];
|
||||
isActive = [NSNumber numberWithBool: [folder isActive]];
|
||||
[calendar setObject: isActive forKey: @"active"];
|
||||
[calendar setObject: [folder ownerInContext: context]
|
||||
forKey: @"owner"];
|
||||
[calendars addObject: calendar];
|
||||
}
|
||||
}
|
||||
|
||||
return calendarFolders;
|
||||
return calendars;
|
||||
}
|
||||
|
||||
- (void) setCurrentCalendarFolder: (NSDictionary *) newCurrentCalendarFolder
|
||||
- (void) setCurrentCalendar: (NSDictionary *) newCalendar
|
||||
{
|
||||
ASSIGN (currentCalendarFolder, newCurrentCalendarFolder);
|
||||
ASSIGN (currentCalendar, newCalendar);
|
||||
}
|
||||
|
||||
- (NSDictionary *) currentCalendarFolder
|
||||
- (NSDictionary *) currentCalendar
|
||||
{
|
||||
return currentCalendarFolder;
|
||||
}
|
||||
|
||||
- (NSString *) currentCalendarSpanBG
|
||||
{
|
||||
NSString *colorKey;
|
||||
|
||||
colorKey = [currentCalendarFolder objectForKey: @"folder"];
|
||||
|
||||
return [colors objectForKey: colorKey];
|
||||
}
|
||||
|
||||
- (NSString *) currentCalendarLogin
|
||||
{
|
||||
NSArray *parts;
|
||||
|
||||
parts = [[currentCalendarFolder objectForKey: @"folder"]
|
||||
componentsSeparatedByString: @":"];
|
||||
|
||||
return (([parts count] > 1)
|
||||
? [parts objectAtIndex: 0]
|
||||
: [[context activeUser] login]);
|
||||
return currentCalendar;
|
||||
}
|
||||
|
||||
- (NSString *) currentCalendarStyle
|
||||
{
|
||||
NSString *color;
|
||||
|
||||
color = [self currentCalendarSpanBG];
|
||||
|
||||
return [NSString stringWithFormat: @"color: %@; background-color: %@;",
|
||||
color, color];
|
||||
return [currentCalendar
|
||||
keysWithFormat: @"color: %{color}; background-color: %{color};"];
|
||||
}
|
||||
|
||||
@end /* UIxCalendarSelector */
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolders.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentObject.h>
|
||||
#import <SoObjects/Appointments/SOGoTaskObject.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
@@ -104,7 +105,6 @@
|
||||
currentAttendee = [attendees nextObject];
|
||||
while (currentAttendee)
|
||||
{
|
||||
NSLog (@"currentCN: %@", [currentAttendee cn]);
|
||||
[names appendFormat: @"%@,", [currentAttendee cn]];
|
||||
[emails appendFormat: @"%@,", [currentAttendee rfc822Email]];
|
||||
currentAttendee = [attendees nextObject];
|
||||
@@ -332,19 +332,20 @@
|
||||
|
||||
- (NSArray *) calendarList
|
||||
{
|
||||
SOGoAppointmentFolder *folder;
|
||||
SOGoAppointmentFolder *calendar, *currentCalendar;
|
||||
SOGoAppointmentFolders *calendarParent;
|
||||
NSEnumerator *allCalendars;
|
||||
NSDictionary *currentCalendar;
|
||||
|
||||
if (!calendarList)
|
||||
{
|
||||
calendarList = [NSMutableArray new];
|
||||
folder = [[self clientObject] container];
|
||||
allCalendars = [[folder calendarFolders] objectEnumerator];
|
||||
calendar = [[self clientObject] container];
|
||||
calendarParent = [calendar container];
|
||||
allCalendars = [[calendarParent subFolders] objectEnumerator];
|
||||
currentCalendar = [allCalendars nextObject];
|
||||
while (currentCalendar)
|
||||
{
|
||||
if ([[currentCalendar objectForKey: @"active"] boolValue])
|
||||
if ([currentCalendar isActive])
|
||||
[calendarList addObject: currentCalendar];
|
||||
currentCalendar = [allCalendars nextObject];
|
||||
}
|
||||
@@ -357,14 +358,18 @@
|
||||
{
|
||||
NSArray *calendars;
|
||||
|
||||
calendars = [[self calendarList] valueForKey: @"folder"];
|
||||
calendars = [[self calendarList] valueForKey: @"nameInContainer"];
|
||||
|
||||
return [calendars componentsJoinedByString: @","];
|
||||
}
|
||||
|
||||
- (NSString *) componentCalendar
|
||||
{
|
||||
return @"/";
|
||||
SOGoAppointmentFolder *calendar;
|
||||
|
||||
calendar = [[self clientObject] container];
|
||||
|
||||
return calendar;
|
||||
}
|
||||
|
||||
/* priorities */
|
||||
@@ -372,14 +377,15 @@
|
||||
- (NSArray *) priorities
|
||||
{
|
||||
/* 0 == undefined
|
||||
5 == normal
|
||||
9 == low
|
||||
5 == medium
|
||||
1 == high
|
||||
*/
|
||||
static NSArray *priorities = nil;
|
||||
|
||||
if (!priorities)
|
||||
{
|
||||
priorities = [NSArray arrayWithObjects: @"0", @"5", @"1", nil];
|
||||
priorities = [NSArray arrayWithObjects: @"9", @"5", @"1", nil];
|
||||
[priorities retain];
|
||||
}
|
||||
|
||||
@@ -855,8 +861,8 @@
|
||||
[component setUid: [clientObject nameInContainer]];
|
||||
[component setCreated: now];
|
||||
[component setTimeStampAsDate: now];
|
||||
[component setPriority: @"0"];
|
||||
}
|
||||
[component setPriority: priority];
|
||||
[component setLastModified: now];
|
||||
}
|
||||
|
||||
|
||||
@@ -324,14 +324,14 @@
|
||||
{
|
||||
NSString *objectId, *method, *uri;
|
||||
id <WOActionResults> result;
|
||||
Class clientKlazz;
|
||||
SOGoAppointmentFolder *co;
|
||||
|
||||
clientKlazz = [[self clientObject] class];
|
||||
objectId = [clientKlazz globallyUniqueObjectId];
|
||||
co = [self clientObject];
|
||||
objectId = [co globallyUniqueObjectId];
|
||||
if ([objectId length] > 0)
|
||||
{
|
||||
method = [NSString stringWithFormat:@"%@/Calendar/%@/editAsTask",
|
||||
[self userFolderPath], objectId];
|
||||
method = [NSString stringWithFormat:@"%@/%@/editAsTask",
|
||||
[co soURL], objectId];
|
||||
uri = [self completeHrefForMethod: method];
|
||||
result = [self redirectToLocation: uri];
|
||||
}
|
||||
@@ -357,8 +357,12 @@
|
||||
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
|
||||
inContext: (WOContext*) context
|
||||
{
|
||||
NSString *actionName;
|
||||
|
||||
actionName = [[request requestHandlerPath] lastPathComponent];
|
||||
|
||||
return ([[self clientObject] isKindOfClass: [SOGoTaskObject class]]
|
||||
&& [[request method] isEqualToString: @"POST"]);
|
||||
&& [actionName hasPrefix: @"save"]);
|
||||
}
|
||||
|
||||
- (void) takeValuesFromRequest: (WORequest *) _rq
|
||||
|
||||
+35
-25
@@ -28,11 +28,11 @@
|
||||
};
|
||||
|
||||
categories = {
|
||||
SOGoAppointmentFolder = {
|
||||
SOGoAppointmentFolders = {
|
||||
slots = {
|
||||
toolbar = {
|
||||
protectedBy = "View";
|
||||
value = "SOGoAppointmentFolder.toolbar";
|
||||
value = "SOGoAppointmentFolders.toolbar";
|
||||
};
|
||||
};
|
||||
methods = {
|
||||
@@ -70,6 +70,38 @@
|
||||
protectedBy = "View";
|
||||
pageName = "UIxCalMonthView";
|
||||
};
|
||||
show = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxCalView";
|
||||
actionName = "redirectForUIDs";
|
||||
};
|
||||
proposal = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxAppointmentProposal";
|
||||
};
|
||||
proposalSearch = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxAppointmentProposal";
|
||||
actionName = "proposalSearch";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxCalUserRightsEditor";
|
||||
};
|
||||
saveUserRights = {
|
||||
protectedBy = "SaveAcls";
|
||||
pageName = "UIxCalUserRightsEditor";
|
||||
actionName = "saveUserRights";
|
||||
};
|
||||
editAttendees = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxAttendeesEditor";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoAppointmentFolder = {
|
||||
methods = {
|
||||
newevent = {
|
||||
protectedBy = "Add Documents, Images, and Files";
|
||||
pageName = "UIxAppointmentEditor";
|
||||
@@ -85,29 +117,6 @@
|
||||
pageName = "UIxCalView";
|
||||
actionName = "redirectForUIDs";
|
||||
};
|
||||
proposal = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxAppointmentProposal";
|
||||
};
|
||||
proposalSearch = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxAppointmentProposal";
|
||||
actionName = "proposalSearch";
|
||||
};
|
||||
batchDelete = {
|
||||
protectedBy = "Delete Objects";
|
||||
pageName = "UIxCalMainView";
|
||||
actionName = "batchDelete";
|
||||
};
|
||||
updateCalendars = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxCalMainView";
|
||||
actionName = "updateCalendars";
|
||||
};
|
||||
editAttendees = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxAttendeesEditor";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxCalUserRightsEditor";
|
||||
@@ -119,6 +128,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoCalendarComponent = {
|
||||
};
|
||||
|
||||
|
||||
@@ -74,6 +74,15 @@
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label><var:string label:value="Screen Name:"
|
||||
/>
|
||||
<input type="text" class="textField" name="screenName"
|
||||
id="screenName" var:value="snapshot.screenName" />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="htmlMailFormat">
|
||||
<label><var:string
|
||||
@@ -86,16 +95,7 @@
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label><var:string label:value="Screen Name:"
|
||||
/>
|
||||
<input type="text" class="textField" name="screenName"
|
||||
id="screenName" var:value="snapshot.screenName" />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<span class="caption"><var:string label:value="Phones" /></span>
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
/><var:string value="primaryEmail" escapeHTML="NO"
|
||||
/><var:string value="secondaryEmail" escapeHTML="NO"
|
||||
/><var:string value="screenName" escapeHTML="NO"
|
||||
/><var:string value="preferredTel" escapeHTML="NO"
|
||||
/><var:string value="preferredAddress" escapeHTML="NO"
|
||||
/></div
|
||||
|
||||
|
||||
@@ -10,22 +10,23 @@
|
||||
selectorComponentClass="selectorComponentClass"
|
||||
title="name">
|
||||
<table id="contactsList" multiselect="yes">
|
||||
<tbody>
|
||||
<thead>
|
||||
<tr class="tableview">
|
||||
<!-- localize -->
|
||||
<td class="tbtv_headercell" id="nameHeader"
|
||||
<td class="tbtv_headercell sortableTableHeader" id="nameHeader"
|
||||
><var:string label:value="Name"
|
||||
/></td
|
||||
><td class="tbtv_headercell" id="mailHeader"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="mailHeader"
|
||||
><var:string label:value="Email"/></td
|
||||
><td class="tbtv_headercell" id="screenNameHeader"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="screenNameHeader"
|
||||
><var:string label:value="Screen Name" /></td
|
||||
><td class="tbtv_headercell" id="orgHeader"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="orgHeader"
|
||||
><var:string label:value="Organization" /></td
|
||||
><td class="tbtv_headercell" id="phoneHeader"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="phoneHeader"
|
||||
><var:string label:value="Work Phone" /></td
|
||||
></tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<var:foreach list="contactInfos" item="currentContact">
|
||||
<tr class="tableview"
|
||||
var:id="currentCName"
|
||||
@@ -33,6 +34,8 @@
|
||||
var:contactid="currentContact.c_uid"
|
||||
onclick="return onContactRowClick(event, this);"
|
||||
ondblclick="return onContactRowDblClick(event, this);"
|
||||
onmousedown="return false;"
|
||||
onselectstart="return false;"
|
||||
oncontextmenu="return onContactContextMenu(event, this);">
|
||||
<td><img rsrc:src="abcard.gif"
|
||||
/><var:string value="currentContact.displayName" const:escapeHTML="YES" /></td>
|
||||
@@ -44,4 +47,4 @@
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
</var:component>
|
||||
</var:component>
|
||||
@@ -62,13 +62,10 @@
|
||||
<ul id="contactFolders">
|
||||
<var:foreach list="contactFolders" item="currentFolder"
|
||||
><li var:id="currentContactFolderId"
|
||||
><var:string value="currentContactFolderName" /></li
|
||||
var:owner="currentContactFolderOwner"
|
||||
><var:string value="currentContactFolderName" /></li
|
||||
></var:foreach
|
||||
><var:foreach list="additionalFolders"
|
||||
item="currentAdditionalFolder"
|
||||
><li var:id="currentAdditionalFolder" class="denied"
|
||||
><var:string value="currentAdditionalFolderName" /></li
|
||||
></var:foreach>
|
||||
>
|
||||
</ul>
|
||||
|
||||
<var:if condition="hasContactSelectionButtons">
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<?xml version="1.0" standalone="yes"?>
|
||||
<div
|
||||
<!DOCTYPE container>
|
||||
<container
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:var="http://www.skyrix.com/od/binding"
|
||||
xmlns:const="http://www.skyrix.com/od/constant"
|
||||
xmlns:rsrc="OGo:url"
|
||||
xmlns:label="OGo:label"
|
||||
class="mailer_htmlcontent SOGoHTMLMail-CSS-Delimiter"
|
||||
><var:string value="flatContentAsString" const:escapeHTML="NO" /></div>
|
||||
xmlns:label="OGo:label">
|
||||
<var:string value="cssContent" const:escapeHTML="NO" />
|
||||
<div class="SOGoHTMLMail-CSS-Delimiter mailer_htmlcontent"
|
||||
><var:string value="flatContentAsString" const:escapeHTML="NO" /></div>
|
||||
</container>
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<form name="pageform" enctype="multipart/form-data" accept-charset="UTF-8">
|
||||
<div id="headerArea">
|
||||
<form const:href="send" name="pageform" enctype="multipart/form-data">
|
||||
<div id="attachmentsArea">
|
||||
<var:string label:value="Attachments:" />
|
||||
<ul id="attachments">
|
||||
@@ -32,6 +31,7 @@
|
||||
/></li></var:foreach>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="headerArea">
|
||||
<span class="headerField"><var:string label:value="From" />:</span>
|
||||
<var:popup const:name="from"
|
||||
list="fromEMails"
|
||||
@@ -51,8 +51,8 @@
|
||||
class="textField"
|
||||
var:value="subject"
|
||||
/></span></div>
|
||||
<!-- separator line --><hr/>
|
||||
</div>
|
||||
<!-- separator line -->
|
||||
<textarea name="text" rows="30" var:value="text" />
|
||||
<!-- img rsrc:src="tbird_073_compose.png" alt="screenshot" / -->
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version='1.0' standalone='yes'?>
|
||||
<!DOCTYPE table>
|
||||
<table multiselect="yes" id="messageList"
|
||||
<table id="messageList"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:var="http://www.skyrix.com/od/binding"
|
||||
xmlns:const="http://www.skyrix.com/od/constant"
|
||||
@@ -13,9 +13,9 @@
|
||||
><td class="tbtv_headercell messageFlagColumn">
|
||||
<img rsrc:src="title_attachment_14x14.png" width="14"
|
||||
height="14"/></td
|
||||
><td class="tbtv_headercell" id="subjectHeader"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="subjectHeader"
|
||||
><var:string label:value="Subject"/></td
|
||||
><td class="tbtv_headercell" id="fromHeader"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="fromHeader"
|
||||
><var:if condition="showToAddress" const:negate="YES"
|
||||
><var:string label:value="From"/></var:if
|
||||
><var:if condition="showToAddress"
|
||||
@@ -23,7 +23,7 @@
|
||||
></td
|
||||
><td class="tbtv_headercell" id="messageFlagHeader"
|
||||
><img rsrc:src="title_read_14x14.png"/></td
|
||||
><td class="tbtv_headercell" id="dateHeader"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="dateHeader"
|
||||
><var:string label:value="Date"/></td
|
||||
></tr>
|
||||
<tr class="tableview"
|
||||
@@ -35,16 +35,21 @@
|
||||
var:idx="prevFirstMessageNumber"
|
||||
><var:string label:value="previous"/></a> |
|
||||
</var:if>
|
||||
<var:string value="firstMessageNumber" />
|
||||
<var:string label:value="msgnumber_to" />
|
||||
<var:string value="lastMessageNumber" />
|
||||
<var:string label:value="msgnumber_of" />
|
||||
<var:string value="sortedUIDs.count" />
|
||||
<var:if condition="hasNext"
|
||||
>| <a href="#"
|
||||
var:idx="nextFirstMessageNumber"
|
||||
><var:string label:value="next" /></a>
|
||||
</var:if
|
||||
<var:if condition="lastMessageNumber" const:negate="YES">
|
||||
0 <var:string label:value="message"/>
|
||||
</var:if>
|
||||
<var:if condition="lastMessageNumber" const:negate="0">
|
||||
<var:string value="firstMessageNumber" />
|
||||
<var:string label:value="msgnumber_to" />
|
||||
<var:string value="lastMessageNumber" />
|
||||
<var:string label:value="msgnumber_of" />
|
||||
<var:string value="sortedUIDs.count" />
|
||||
<var:if condition="hasNext"
|
||||
>| <a href="#"
|
||||
var:idx="nextFirstMessageNumber"
|
||||
><var:string label:value="next" /></a>
|
||||
</var:if>
|
||||
</var:if
|
||||
></td
|
||||
></tr
|
||||
>
|
||||
@@ -62,8 +67,7 @@
|
||||
><td
|
||||
var:class="messageSubjectCellStyleClass"
|
||||
var:id="msgDivID"
|
||||
><var:string value="message.envelope.subject"
|
||||
formatter="context.mailSubjectFormatter"
|
||||
><var:string value="messageSubject"
|
||||
/></td
|
||||
|
||||
><td class="messageAddressColumn"
|
||||
|
||||
@@ -66,11 +66,20 @@
|
||||
<li><var:string label:value="Rename Folder..." /></li>
|
||||
<li><var:string label:value="Compact This Folder" /></li>
|
||||
<li><var:string label:value="Delete Folder" /></li>
|
||||
<li><var:string label:value="Use This Folder For" /></li>
|
||||
<li><!-- separator --></li>
|
||||
<li><var:string label:value="Search Messages..." /></li>
|
||||
<li><var:string label:value="Sharing..." /></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="menu" id="folderTypeMenu">
|
||||
<ul>
|
||||
<li><var:string label:value="Sent Messages" /></li>
|
||||
<li><var:string label:value="Drafts" /></li>
|
||||
<li><var:string label:value="Deleted Messages" /></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="menu" id="addressMenu">
|
||||
<ul>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<var:popup name="currentPopUpId"
|
||||
list="headers"
|
||||
item="item"
|
||||
label:string="$item"
|
||||
label:displayString="$item"
|
||||
selection="currentHeader"
|
||||
/>
|
||||
</span>
|
||||
@@ -41,7 +41,7 @@
|
||||
const:disabled="1"
|
||||
list="headers"
|
||||
item="item"
|
||||
label:string="$item"
|
||||
label:displayString="$item"
|
||||
/>
|
||||
</span>
|
||||
<span class="headerInput">
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
<?xml version='1.0' standalone='yes'?>
|
||||
<html
|
||||
<?xml version="1.0" standalone="yes"?>
|
||||
<!DOCTYPE var:component>
|
||||
<var:component
|
||||
className="UIxPageFrame"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:var="http://www.skyrix.com/od/binding"
|
||||
xmlns:const="http://www.skyrix.com/od/constant"
|
||||
>
|
||||
<head>
|
||||
<title>Scalable OGo Homepage</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3>Scalable OGo Homepage</h3>
|
||||
|
||||
<form href="connect">
|
||||
Login:
|
||||
<input name="userName" type="text" var:value="userName" />
|
||||
<input name="submit" type="submit" value="connect" />
|
||||
</form>
|
||||
<!--
|
||||
<hr />
|
||||
Current locale: <pre><var:string value="context.locale" /></pre>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
xmlns:rsrc="OGo:url"
|
||||
xmlns:label="OGo:label"
|
||||
><var:string var:value="doctype" const:escapeHTML="NO"/>
|
||||
<form id="connectForm" var:href="connectURL">
|
||||
<div id="loginScreen">
|
||||
<img id="splash" rsrc:src="lori-login.jpg"/><br/><br/>
|
||||
<var:if condition="shortUserNameForDisplay" const:value="wrongusernamepassword"
|
||||
><p class="error"><var:string label:value="Wrong username or password."/></p>
|
||||
</var:if><label><var:string label:value="Login:"/><br/>
|
||||
<input class="textField" id="userName" name="userName"
|
||||
type="text" var:value="userName" /></label><br/>
|
||||
<label><var:string label:value="Password:"/><br/>
|
||||
<input class="textField" id="password"
|
||||
name="password" type="password" var:value="password" /><br/></label>
|
||||
<div id="loginButton">
|
||||
<input class="button" id="submit" name="submit" type="submit" label:value="Connect" />
|
||||
</div>
|
||||
</div>
|
||||
</form
|
||||
><img id="preparedAnimation" rsrc:src="busy.gif"/>
|
||||
</var:component>
|
||||
|
||||
@@ -13,10 +13,8 @@
|
||||
<form id="mainForm" var:href="ownPath">
|
||||
<div class="tabsContainer" id="preferencesTabs">
|
||||
<ul>
|
||||
<li target="outOfOfficeView"><var:string
|
||||
label:value="Out of Office"/></li>
|
||||
<li target="dateTimeView"><var:string
|
||||
label:value="Date and Time"/></li>
|
||||
<li target="generalView"><var:string
|
||||
label:value="General"/></li>
|
||||
<li target="calendarOptionsView"><var:string
|
||||
label:value="Calendar Options"/></li>
|
||||
<li target="mailOptionsView"><var:string
|
||||
@@ -25,23 +23,7 @@
|
||||
<li target="passwordView"><var:string label:value="Password"/></li>
|
||||
</var:if>
|
||||
</ul>
|
||||
<div id="outOfOfficeView" class="tab">
|
||||
<label><input
|
||||
const:name="inTheOffice" type="radio" const:value="YES"
|
||||
var:selection="inTheOffice"/>
|
||||
<var:string label:value="I'm currently in the office"/></label><br/>
|
||||
<label><input
|
||||
const:name="inTheOffice" type="radio" const:value="NO"
|
||||
var:selection="inTheOffice"/>
|
||||
<var:string label:value="I'm currently out of the office"/></label><br/>
|
||||
<br/>
|
||||
<div id="outOfOfficeMessage">
|
||||
<label><var:string label:value="AutoReply only once to each sender with the following text :"/><br/>
|
||||
<textarea const:name="autoReplyText" var:value="autoReplyText"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dateTimeView" class="tab">
|
||||
<div id="generalView" class="tab">
|
||||
<label><var:string label:value="Current Time Zone :"/>
|
||||
<var:popup list="timeZonesList" item="item"
|
||||
string="item" selection="userTimeZone" /></label><br/>
|
||||
@@ -95,6 +77,20 @@
|
||||
<label><var:string label:value="Forward messages:"/>
|
||||
<var:popup list="messageForwardingList" item="item"
|
||||
string="itemMessageForwardingText" selection="userMessageForwarding"/></label><br/>
|
||||
<label><input
|
||||
const:name="inTheOffice" type="radio" const:value="YES"
|
||||
var:selection="inTheOffice"/>
|
||||
<var:string label:value="I'm currently in the office"/></label><br/>
|
||||
<label><input
|
||||
const:name="inTheOffice" type="radio" const:value="NO"
|
||||
var:selection="inTheOffice"/>
|
||||
<var:string label:value="I'm currently out of the office"/></label><br/>
|
||||
<br/>
|
||||
<div id="outOfOfficeMessage">
|
||||
<label><var:string label:value="AutoReply only once to each sender with the following text :"/><br/>
|
||||
<textarea const:name="autoReplyText" var:value="autoReplyText"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<var:if condition="shouldDisplayPasswordChange">
|
||||
<div id="passwordView" class="tab">
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" standalone="yes"?>
|
||||
<!DOCTYPE container>
|
||||
<container
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:var="http://www.skyrix.com/od/binding"
|
||||
xmlns:const="http://www.skyrix.com/od/constant"
|
||||
xmlns:rsrc="OGo:url"
|
||||
xmlns:label="OGo:label">
|
||||
|
||||
<var:if condition="isSubject">
|
||||
<var:string value="displayName"/> has been created
|
||||
</var:if>
|
||||
|
||||
<var:if condition="isBody">
|
||||
The <var:string value="displayName"/> folder has been created.
|
||||
|
||||
You can access this resource remotely by using the following URL:
|
||||
|
||||
<var:string value="httpFolderURL"/>
|
||||
</var:if>
|
||||
|
||||
</container>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user