See ChangeLog.
Monotone-Parent: fdc663e746cda0a1106c97d2d9af95b6eb0d1b40 Monotone-Revision: 56738c967d1f191a027f45f12a017405441e69ca Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2010-05-27T17:09:02 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
4b63a768c4
commit
0176350dbc
|
@ -7,12 +7,16 @@
|
||||||
2010-05-27 Francis Lachapelle <flachapelle@inverse.ca>
|
2010-05-27 Francis Lachapelle <flachapelle@inverse.ca>
|
||||||
|
|
||||||
* UI/MailerUI/UIxMailListActions.m: renamed from
|
* UI/MailerUI/UIxMailListActions.m: renamed from
|
||||||
UIxMailListview.m. Associated .wox was removed.
|
UIxMailListview.m. Associated .wox was removed and converted to a
|
||||||
|
WODirectAction.
|
||||||
(-getSortedUIDsAction): new method that returns a JSON
|
(-getSortedUIDsAction): new method that returns a JSON
|
||||||
array with all the messages UIDs of the mailbox, sorted as requested.
|
array with all the messages UIDs of the mailbox, sorted as requested.
|
||||||
(-getHeadersAction): new method that returns a JSON dictionary of
|
(-getHeadersAction): new method that returns a JSON dictionary of
|
||||||
the headers of requested messages UIDs.
|
the headers of requested messages UIDs.
|
||||||
|
|
||||||
|
* UI/Common/WODirectAction+SOGo.m (-pageResourceManager,
|
||||||
|
-urlForResourceFilename): methods copied from UIxComponent.
|
||||||
|
|
||||||
* UI/WebServerResources/SOGoDataTable.js: new interface to add
|
* UI/WebServerResources/SOGoDataTable.js: new interface to add
|
||||||
"live loading" to a table.
|
"live loading" to a table.
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#import <NGObjWeb/WODirectAction.h>
|
#import <NGObjWeb/WODirectAction.h>
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class WOResponse;
|
@class WOResponse, WOResourceManager;
|
||||||
|
|
||||||
@interface WODirectAction (SOGoExtension)
|
@interface WODirectAction (SOGoExtension)
|
||||||
|
|
||||||
|
@ -40,6 +40,9 @@
|
||||||
|
|
||||||
- (NSString *) labelForKey: (NSString *) _str;
|
- (NSString *) labelForKey: (NSString *) _str;
|
||||||
|
|
||||||
|
- (WOResourceManager *) pageResourceManager;
|
||||||
|
- (NSString *) urlForResourceFilename: (NSString *) filename;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* WODIRECTACTION_SOGO_H */
|
#endif /* WODIRECTACTION_SOGO_H */
|
||||||
|
|
|
@ -22,11 +22,13 @@
|
||||||
|
|
||||||
#import <Foundation/NSBundle.h>
|
#import <Foundation/NSBundle.h>
|
||||||
|
|
||||||
|
#import <NGObjWeb/SoObjects.h>
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
#import <NGObjWeb/WOResponse.h>
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||||
|
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||||
#import <SoObjects/SOGo/SOGoUser.h>
|
#import <SoObjects/SOGo/SOGoUser.h>
|
||||||
#import <SoObjects/SOGo/SOGoUserDefaults.h>
|
#import <SoObjects/SOGo/SOGoUserDefaults.h>
|
||||||
|
|
||||||
|
@ -119,4 +121,54 @@
|
||||||
|
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (WOResourceManager *) pageResourceManager
|
||||||
|
{
|
||||||
|
WOResourceManager *rm;
|
||||||
|
|
||||||
|
if ((rm = [[context page] resourceManager]) == nil)
|
||||||
|
rm = [[WOApplication application] resourceManager];
|
||||||
|
|
||||||
|
return rm;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *) urlForResourceFilename: (NSString *) filename
|
||||||
|
{
|
||||||
|
static NSMutableDictionary *pageToURL = nil;
|
||||||
|
NSString *url;
|
||||||
|
WOComponent *page;
|
||||||
|
WOResourceManager *rm;
|
||||||
|
NSBundle *pageBundle;
|
||||||
|
|
||||||
|
if (filename)
|
||||||
|
{
|
||||||
|
if (!pageToURL)
|
||||||
|
pageToURL = [[NSMutableDictionary alloc] initWithCapacity: 32];
|
||||||
|
|
||||||
|
url = [pageToURL objectForKey: filename];
|
||||||
|
if (!url)
|
||||||
|
{
|
||||||
|
rm = [self pageResourceManager];
|
||||||
|
page = [context page];
|
||||||
|
pageBundle = [NSBundle bundleForClass: [page class]];
|
||||||
|
url = [rm urlForResourceNamed: filename
|
||||||
|
inFramework: [pageBundle bundlePath]
|
||||||
|
languages: nil
|
||||||
|
request: [context request]];
|
||||||
|
if (!url)
|
||||||
|
url = @"";
|
||||||
|
else
|
||||||
|
if ([url hasPrefix: @"http"])
|
||||||
|
url = [url hostlessURL];
|
||||||
|
[pageToURL setObject: url forKey: filename];
|
||||||
|
}
|
||||||
|
|
||||||
|
// NSLog (@"url for '%@': '%@'", filename, url);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
url = @"";
|
||||||
|
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
#ifndef UIXMAILLISTACTIONS_H
|
#ifndef UIXMAILLISTACTIONS_H
|
||||||
#define UIXMAILLISTACTIONS_H
|
#define UIXMAILLISTACTIONS_H
|
||||||
|
|
||||||
#import <SOGoUI/UIxComponent.h>
|
#import <NGObjWeb/WODirectAction.h>
|
||||||
|
|
||||||
@class NSDictionary;
|
@class NSDictionary;
|
||||||
@class EOQualifier;
|
@class EOQualifier;
|
||||||
@class SOGoDateFormatter;
|
@class SOGoDateFormatter;
|
||||||
|
|
||||||
@interface UIxMailListActions : UIxComponent
|
@interface UIxMailListActions : WODirectAction
|
||||||
{
|
{
|
||||||
NSArray *sortedUIDs; /* we always need to retrieve all anyway! */
|
NSArray *sortedUIDs; /* we always need to retrieve all anyway! */
|
||||||
NSArray *messages;
|
NSArray *messages;
|
||||||
|
@ -45,6 +45,10 @@
|
||||||
- (EOQualifier *) searchQualifier;
|
- (EOQualifier *) searchQualifier;
|
||||||
- (NSString *) msgLabels;
|
- (NSString *) msgLabels;
|
||||||
|
|
||||||
|
- (id) getMailAction;
|
||||||
|
- (id <WOActionResults>) getSortedUIDsAction;
|
||||||
|
- (id <WOActionResults>) getHeadersAction;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* UIXMAILLISTACTIONS_H */
|
#endif /* UIXMAILLISTACTIONS_H */
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#import <Foundation/NSTimeZone.h>
|
#import <Foundation/NSTimeZone.h>
|
||||||
#import <Foundation/NSValue.h>
|
#import <Foundation/NSValue.h>
|
||||||
|
|
||||||
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
#import <NGObjWeb/WOResponse.h>
|
#import <NGObjWeb/WOResponse.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
#import <NGObjWeb/SoObject+SoDAV.h>
|
#import <NGObjWeb/SoObject+SoDAV.h>
|
||||||
|
@ -56,19 +57,20 @@
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
#import <SOGo/SOGoUserDefaults.h>
|
#import <SOGo/SOGoUserDefaults.h>
|
||||||
|
|
||||||
#import "WOContext+UIxMailer.h"
|
#import <UI/Common/WODirectAction+SOGo.h>
|
||||||
|
|
||||||
|
#import "WOContext+UIxMailer.h"
|
||||||
#import "UIxMailListActions.h"
|
#import "UIxMailListActions.h"
|
||||||
|
|
||||||
@implementation UIxMailListActions
|
@implementation UIxMailListActions
|
||||||
|
|
||||||
- (id) init
|
- (id) initWithRequest: (WORequest *) newRequest
|
||||||
{
|
{
|
||||||
SOGoUser *user;
|
SOGoUser *user;
|
||||||
|
|
||||||
if ((self = [super init]))
|
if ((self = [super initWithRequest: newRequest]))
|
||||||
{
|
{
|
||||||
user = [context activeUser];
|
user = [[self context] activeUser];
|
||||||
ASSIGN (dateFormatter, [user dateFormatterInContext: context]);
|
ASSIGN (dateFormatter, [user dateFormatterInContext: context]);
|
||||||
ASSIGN (userTimeZone, [[user userDefaults] timeZone]);
|
ASSIGN (userTimeZone, [[user userDefaults] timeZone]);
|
||||||
folderType = 0;
|
folderType = 0;
|
||||||
|
|
|
@ -79,17 +79,17 @@
|
||||||
methods = {
|
methods = {
|
||||||
getMail = {
|
getMail = {
|
||||||
protectedBy = "View";
|
protectedBy = "View";
|
||||||
pageName = "UIxMailListActions";
|
actionClass = "UIxMailListActions";
|
||||||
actionName = "getMail";
|
actionName = "getMail";
|
||||||
};
|
};
|
||||||
uids = {
|
uids = {
|
||||||
protectedBy = "<public>";
|
protectedBy = "<public>";
|
||||||
pageName = "UIxMailListActions";
|
actionClass = "UIxMailListActions";
|
||||||
actionName = "getSortedUIDs";
|
actionName = "getSortedUIDs";
|
||||||
};
|
};
|
||||||
headers = {
|
headers = {
|
||||||
protectedBy = "<public>";
|
protectedBy = "<public>";
|
||||||
pageName = "UIxMailListActions";
|
actionClass = "UIxMailListActions";
|
||||||
actionName = "getHeaders";
|
actionName = "getHeaders";
|
||||||
};
|
};
|
||||||
subscribe = {
|
subscribe = {
|
||||||
|
|
Loading…
Reference in a new issue