2007-08-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ * SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder
+ -_flattenedRecords:records]): when the c_cn field is empty,
+ returns set a formatted string with the concatenation of
+ c_givenname and c_sn as the displayName.
+
+ * SoObjects/Mailer/SOGoMailAccounts.m ([SOGoMailAccounts
+ -isValidMailAccountName:_key]): prevent unknown accounts from
+ being accessed.
+
+ * UI/MailPartViewers/UIxMailPartViewer.m ([UIxMailPartViewer
+ -pathToAttachmentObject]): we no longer need the filename
+ extension for SoLookup...
+
+ * SoObjects/Mailer/SOGoMailBodyPart.m ([SOGoMailBodyPart
+ -lookupName:_keyinContext:_ctxacquire:_flag]): do not require the
+ filename to have an extension, and thus accept any filename.
+
+ * UI/Contacts/UIxContactsListView.m ([UIxContactsListView
+ -currentCName]): new method that returns the c_name of the
+ contact, correctly escaped to be passed by url afterwards.
+
* UI/MailPartViewers/UIxMailPartHTMLViewer.m
([UIxMailPartHTMLViewer -flatContentAsString]): pass the NSData
instance of [self decodedFlatContent] instead of the buggy
of sendmail;
- rewrote the handling of draft objects to comply better with the behaviour of
Thunderbird;
+- added a German translation based on Thunderbird;
0.9.0-20070713
--------------
#import <EOControl/EOSortOrdering.h>
#import <GDLContentStore/GCSFolder.h>
+#import <SoObjects/SOGo/NSDictionary+Utilities.h>
#import "SOGoContactGCSEntry.h"
#import "SOGoContactGCSFolder.h"
#define folderListingFields [NSArray arrayWithObjects: @"c_name", @"c_cn", \
- @"c_givenname", @"c_screenname", \
+ @"c_givenname", @"c_sn", @"c_screenname", \
@"c_o", @"c_mail", @"c_telephonenumber", \
nil]
forKey: @"c_name"];
data = [oldRecord objectForKey: @"c_cn"];
- if (!data)
- data = @"";
+ if (![data length])
+ data = [oldRecord keysWithFormat: @"%{c_givenname} %{c_sn}"];
[newRecord setObject: data
forKey: @"displayName"];
- (BOOL) isValidMailAccountName: (NSString *) _key
{
- return ([_key length] > 0);
+ NSArray *accounts;
+
+ accounts = [[context activeUser] mailAccounts];
+
+ return [[accounts objectsForKey: @"name"] containsObject: _key];
}
- (id) mailAccountWithName: (NSString *) _key
/* name lookup */
-- (id)lookupImap4BodyPartKey:(NSString *)_key inContext:(id)_ctx {
+- (id) lookupImap4BodyPartKey: (NSString *) _key
+ inContext: (id) _ctx
+{
// TODO: we might want to check for existence prior controller creation
Class clazz;
clazz = [SOGoMailBodyPart bodyPartClassForKey:_key inContext:_ctx];
- return [[[clazz alloc] initWithName:_key inContainer:self] autorelease];
+
+ return [clazz objectWithName: _key inContainer: self];
}
-- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
+- (id) lookupName: (NSString *) _key
+ inContext: (id) _ctx
+ acquire: (BOOL) _flag
+{
id obj;
/* first check attributes directly bound to the application */
- if ((obj = [super lookupName:_key inContext:_ctx acquire:NO]) != nil)
- return obj;
-
- /* lookup body part */
-
- if ([self isBodyPartKey:_key inContext:_ctx]) {
- if ((obj = [self lookupImap4BodyPartKey:_key inContext:_ctx]) != nil)
- return obj;
- }
-
- /*
- Treat other keys which have a path-extension as 'virtual' noops to allow
- addition of path names to the attachment path, eg:
- http://.../login@server/INBOX/1/2/3/MyDocument.pdf
- */
- if ([[_key pathExtension] length] > 0)
- return self;
-
- /* return 404 to stop acquisition */
- return [NSException exceptionWithHTTPStatus:404 /* Not Found */
- reason:@"Did not find a subpart for the given name!"];
+ obj = [super lookupName:_key inContext:_ctx acquire:NO];
+ if (!obj)
+ {
+ /* lookup body part */
+ if ([self isBodyPartKey:_key inContext:_ctx])
+ obj = [self lookupImap4BodyPartKey:_key inContext:_ctx];
+ /* should check whether such a filename exist in the attached names */
+ if (!obj)
+ obj = self;
+ }
+
+ return obj;
}
/* fetch */
if (!coreInfos)
{
- msgs = [self fetchParts:coreInfoKeys]; // returns dict
+ msgs = [self fetchParts: coreInfoKeys]; // returns dict
if (heavyDebug)
[self logWithFormat: @"M: %@", msgs];
msgs = [msgs valueForKey: @"fetch"];
CommonUI_PRINCIPAL_CLASS = CommonUIProduct
-CommonUI_LANGUAGES = English French
+CommonUI_LANGUAGES = English French German
CommonUI_OBJC_FILES += \
CommonUIProduct.m \
ContactsUI_PRINCIPAL_CLASS = ContactsUIProduct
-ContactsUI_LANGUAGES = English French
+ContactsUI_LANGUAGES = English French German
ContactsUI_OBJC_FILES = \
UIxContactsUserFolders.m \
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WOResponse.h>
+#import <NGExtensions/NSString+misc.h>
#import <Contacts/SOGoContactObject.h>
#import <Contacts/SOGoContactFolder.h>
return currentContact;
}
+- (NSString *) currentCName
+{
+ NSString *cName;
+
+ cName = [currentContact objectForKey: @"c_name"];
+
+ return [cName stringByEscapingURL];
+}
+
- (id <WOActionResults>) mailerContactsAction
{
selectorComponentClass = @"UIxContactsMailerSelection";
MailPartViewers_PRINCIPAL_CLASS = MailPartViewersProduct
-MailPartViewers_LANGUAGES = English French
-
-MailPartViewers_LANGUAGES = English French
+MailPartViewers_LANGUAGES = English French German
MailPartViewers_OBJC_FILES += \
MailPartViewersProduct.m \
if ([(n = [partPath componentsJoinedByString:@"/"]) isNotNull])
url = [url stringByAppendingString:n];
- /* we currently NEED the extension for SoObject lookup (should be fixed) */
-
- pext = [self preferredPathExtension];
- if ([pext isNotNull] && [pext length] > 0)
- {
- /* attach extension */
- if ([url hasSuffix:@"/"]) {
- /* this happens if the part is the root-content of the mail */
- url = [url substringToIndex:([url length] - 1)];
- }
- url = [url stringByAppendingString:@"."];
- url = [url stringByAppendingString:pext];
- }
-
return url;
}
- (NSString *) pathToAttachment
{
/* this generates a more beautiful 'download' URL for a part */
- NSString *url, *fn;
-
- fn = [self filename];
-
- if (![fn isNotNull] || ([fn length] == 0))
- fn = nil;
-
- /* get basic URL */
+ NSString *fn;
+ NSMutableString *url;
- url = [self pathToAttachmentObject];
+ fn = [self filename];
+ if ([fn length] > 0)
+ {
+ /* get basic URL */
+ url = [NSMutableString stringWithString: [self pathToAttachmentObject]];
- /*
- If we have an attachment name, we attach it, this is properly handled by
- SOGoMailBodyPart.
- */
+ /*
+ If we have an attachment name, we attach it, this is properly handled by
+ SOGoMailBodyPart.
+ */
- if (fn)
- {
if (![url hasSuffix: @"/"])
- url = [url stringByAppendingString: @"/"];
- if (isdigit([fn characterAtIndex:0]))
- url = [url stringByAppendingString: @"fn-"];
- url = [url stringByAppendingString: [fn stringByEscapingURL]];
-
- // TODO: should we check for a proper extension?
+ [url appendString: @"/"];
+ if (isdigit([url characterAtIndex: 0]))
+ [url appendString: @"fn-"];
+ [url appendString: [fn stringByEscapingURL]];
+ // TODO: should we check for a proper extension?
}
+ else
+ url = nil;
return url;
}
MailerUI_PRINCIPAL_CLASS = MailerUIProduct
-MailerUI_LANGUAGES = English French
+MailerUI_LANGUAGES = English French German
MailerUI_OBJC_FILES += \
MailerUIProduct.m \
MainUI_PRINCIPAL_CLASS = MainUIProduct
-MainUI_LANGUAGES = English French
+MainUI_LANGUAGES = English French German
MainUI_OBJC_FILES += \
MainUIProduct.m \
"reminderTime_0030" = "30 minutes";
"reminderTime_0100" = "1 hour";
"reminderTime_0200" = "2 hours";
-"reminderTime_0400" = "2 hours";
-"reminderTime_0800" = "2 hours";
+"reminderTime_0400" = "4 hours";
+"reminderTime_0800" = "8 hours";
"reminderTime_1200" = "1/2 day";
"reminderTime_2400" = "1 day";
"reminderTime_4800" = "2 days";
"reminderTime_0030" = "30 minutes";
"reminderTime_0100" = "1 heure";
"reminderTime_0200" = "2 heures";
-"reminderTime_0400" = "2 heures";
-"reminderTime_0800" = "2 heures";
+"reminderTime_0400" = "4 heures";
+"reminderTime_0800" = "8 heures";
"reminderTime_1200" = "1/2 journée";
"reminderTime_2400" = "1 journée";
"reminderTime_4800" = "2 journées";
PreferencesUI_PRINCIPAL_CLASS = PreferencesUIProduct
-PreferencesUI_LANGUAGES = English French
+PreferencesUI_LANGUAGES = English French German
PreferencesUI_OBJC_FILES = \
PreferencesUIProduct.m \
<var:foreach list="contactInfos" item="currentContact">
<tr class="tableview"
- var:id="currentContact.c_name"
+ var:id="currentCName"
var:contactname="currentContact.displayName"
var:contactid="currentContact.c_uid"
onclick="return onContactRowClick(event, this);"
<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE div>
<div xmlns="http://www.w3.org/1999/xhtml"
- xmlns:var="http://www.skyrix.com/od/binding"
- xmlns:label="OGo:label"
- class="linked_attachment_frame"
->
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:const="http://www.skyrix.com/od/constant"
+ xmlns:label="OGo:label"
+ class="linked_attachment_frame"
+ >
<div class="linked_attachment_body">
<a var:href="pathToAttachment"
- var:title="filenameForDisplay"
- ><var:string value="filenameForDisplay" /></a>
+ var:title="filenameForDisplay"
+ const:absolute="YES"
+ ><var:string value="filenameForDisplay" /></a>
<div class="linked_attachment_meta">
<var:string label:value="Type" />:
<var:string value="bodyInfo.type" /> /
<var:string value="bodyInfo.size" formatter="sizeFormatter" />
</div>
-<!-- debug
+ <!-- debug
<pre><var:string value="bodyInfo"/></pre>
-
+
<a var:href="pathToAttachment"
- var:title="bodyInfo"
- class="mailer_imagecontent"
- >[<var:string value="pathToAttachment" />]</a>
+ var:title="bodyInfo"
+ class="mailer_imagecontent"
+ >[<var:string value="pathToAttachment" />]</a>
<br />
Id: <var:string value="bodyInfo.bodyId" /><br />
Desc: <var:string value="bodyInfo.description" /><br />
Subtype: <var:string value="bodyInfo.subtype" /><br />
Path: <var:string value="pathToAttachment" /><br />
PartPath: <var:string value="partPath" /><br />
--->
+ -->
</div>
</div>
var row = document.createElement("tr");
table.appendChild(row);
$(row).addClassName("eventRow");
- row.setAttribute("id", data[i][0]);
- row.cname = data[i][0];
+ row.setAttribute("id", escape(data[i][0]));
+ row.cname = escape(data[i][0]);
row.owner = data[i][1];
var startDate = new Date();