From: helge Date: Fri, 27 Aug 2004 00:03:23 +0000 (+0000) Subject: more contact work X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5be671b054c753c3b33d6b0831b64f495df9e08;p=scalable-opengroupware.org more contact work git-svn-id: http://svn.opengroupware.org/SOGo/trunk@279 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SoObjects/Contacts/ChangeLog b/SOGo/SoObjects/Contacts/ChangeLog index 3b21ef60..dd949d54 100644 --- a/SOGo/SoObjects/Contacts/ChangeLog +++ b/SOGo/SoObjects/Contacts/ChangeLog @@ -1,4 +1,7 @@ 2004-08-27 Helge Hess + + * SOGoContactObject.[hm]: can now decode the property list stored in + the store (v0.9.2) * started implementation of contact folders (v0.9.1) diff --git a/SOGo/SoObjects/Contacts/README b/SOGo/SoObjects/Contacts/README new file mode 100644 index 00000000..03b4f53c --- /dev/null +++ b/SOGo/SoObjects/Contacts/README @@ -0,0 +1,58 @@ + +We can basically store anything we want in the property list. But we should +watch inetOrgPerson and vCard person compatibility in case we want to move +to vCard storage later on. + +inetOrgPerson fields +==================== + businessCategory + carLicense + departmentNumber + destinationIndicator + employeeNumber + employeeType + facsimileTelephoneNumber + givenName + homePostalAddress + initials + jpegPhoto + l + mail + manager + mobile + o + objectClass + ou + pager + physicalDeliveryOfficeName + postOfficeBox + postalCode + preferredLanguage + registeredAddress + roomNumber + secretary + seeAlso + sn + street + telephoneNumber + teletexTerminalIdentifier + title + uid + userCertificate + userPKCS12 + userPassword + x121Address + audio + cn + description + displayName + homePhone + internationaliSDNNumber + labeledURI + photo + postalAddress + preferredDeliveryMethod + st + telexNumber + userSMIMECertificate + x500uniqueIdentifier diff --git a/SOGo/SoObjects/Contacts/SOGoContactObject.h b/SOGo/SoObjects/Contacts/SOGoContactObject.h index 6a532da8..2290d334 100644 --- a/SOGo/SoObjects/Contacts/SOGoContactObject.h +++ b/SOGo/SoObjects/Contacts/SOGoContactObject.h @@ -36,12 +36,17 @@ appointments with an externally generated unique key. */ -@class NSString, NSArray, NSException; +@class NSDictionary; @interface SOGoContactObject : SOGoContentObject { + NSDictionary *record; } +/* accessors */ + +- (NSDictionary *)record; + @end #endif /* __Contacts_SOGoContactObject_H__ */ diff --git a/SOGo/SoObjects/Contacts/SOGoContactObject.m b/SOGo/SoObjects/Contacts/SOGoContactObject.m index cbd6b6cb..c446ce5b 100644 --- a/SOGo/SoObjects/Contacts/SOGoContactObject.m +++ b/SOGo/SoObjects/Contacts/SOGoContactObject.m @@ -26,10 +26,28 @@ @implementation SOGoContactObject - (void)dealloc { + [self->record release]; [super dealloc]; } -/* accessors */ +/* content */ + +- (NSDictionary *)record { + if (self->record == nil) + self->record = [[[self contentAsString] propertyList] copy]; + return self->record; +} + +/* key value coding */ + +- (id)valueForKey:(NSString *)_key { + id value; + + if ((value = [[self record] valueForKey:_key]) != nil) + return value; + + return [super valueForKey:_key]; +} /* GET */ diff --git a/SOGo/SoObjects/Contacts/Version b/SOGo/SoObjects/Contacts/Version index 237a5904..1bf86739 100644 --- a/SOGo/SoObjects/Contacts/Version +++ b/SOGo/SoObjects/Contacts/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=1 +SUBMINOR_VERSION:=2 diff --git a/SOGo/UI/Common/ChangeLog b/SOGo/UI/Common/ChangeLog index 376866e8..be46224a 100644 --- a/SOGo/UI/Common/ChangeLog +++ b/SOGo/UI/Common/ChangeLog @@ -1,5 +1,9 @@ 2004-08-27 Helge Hess + * v0.9.19 + + * UIxPageFrame.wox: navigation below the line, app selection above + * uix.css: make 'defaultfont' a generic class * UIxPageFrame.wox: added top-level menu with links for Calendar and diff --git a/SOGo/UI/Common/UIxPageFrame.wox b/SOGo/UI/Common/UIxPageFrame.wox index 82efe4dd..0c6815eb 100644 --- a/SOGo/UI/Common/UIxPageFrame.wox +++ b/SOGo/UI/Common/UIxPageFrame.wox @@ -16,35 +16,16 @@ - -
- Calendar | - Addressbook -
- - - - - - - - -
- - - - - -
-
+ diff --git a/SOGo/UI/Common/Version b/SOGo/UI/Common/Version index cd35ad0f..93c8cd1d 100644 --- a/SOGo/UI/Common/Version +++ b/SOGo/UI/Common/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=18 +SUBMINOR_VERSION:=19 diff --git a/SOGo/UI/Contacts/UIxContactView.m b/SOGo/UI/Contacts/UIxContactView.m index 97bd85df..dc4d565e 100644 --- a/SOGo/UI/Contacts/UIxContactView.m +++ b/SOGo/UI/Contacts/UIxContactView.m @@ -1,7 +1,7 @@ /* - Copyright (C) 2000-2004 SKYRIX Software AG + Copyright (C) 2004 SKYRIX Software AG - This file is part of OGo + This file is part of OpenGroupware.org. OGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the @@ -25,19 +25,65 @@ @interface UIxContactView : UIxComponent { - } - (BOOL)isDeletableClientObject; @end +#include #include "common.h" @implementation UIxContactView +/* accessors */ + +- (NSString *)tabSelection { + NSString *selection; + + selection = [self queryParameterForKey:@"tab"]; + if (selection == nil) + selection = @"attributes"; + return selection; +} + +/* hrefs */ + +- (NSString *)completeHrefForMethod:(NSString *)_method + withParameter:(NSString *)_param + forKey:(NSString *)_key +{ + NSString *href; + + [self setQueryParameter:_param forKey:_key]; + href = [self completeHrefForMethod:[self ownMethodName]]; + [self setQueryParameter:nil forKey:_key]; + return href; +} + +- (NSString *)attributesTabLink { + return [self completeHrefForMethod:[self ownMethodName] + withParameter:@"attributes" + forKey:@"tab"]; +} +- (NSString *)debugTabLink { + return [self completeHrefForMethod:[self ownMethodName] + withParameter:@"debug" + forKey:@"tab"]; +} + +/* action */ + +- (id)defaultAction { + if ([[self clientObject] record] == nil) { + return [NSException exceptionWithHTTPStatus:404 /* Not Found */ + reason:@"could not locate contact"]; + } + return self; +} + - (BOOL)isDeletableClientObject { - return [[self clientObject] respondsToSelector:@selector(delete)]; + return [[self clientObject] respondsToSelector:@selector(delete)]; } - (id)deleteAction { @@ -61,4 +107,4 @@ return [self redirectToLocation:url]; } -@end +@end /* UIxContactView */ diff --git a/SOGo/UI/Contacts/UIxContactView.wox b/SOGo/UI/Contacts/UIxContactView.wox index 7f53e297..dac801aa 100644 --- a/SOGo/UI/Contacts/UIxContactView.wox +++ b/SOGo/UI/Contacts/UIxContactView.wox @@ -7,8 +7,159 @@ className="UIxPageFrame" title="name" > +
- + + +
- + + Calendar | + Addressbook @@ -66,6 +47,11 @@
+ +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + Address Viewer + + +
+
+ + + + + +
+ + + + + + + +
+ edit + + delete +
+
+
+ + + + + + + + + + +
+ Name: + + + + +
+ Location: + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ E-Mail: + + + +
+ Phone: + + + +
+ Organisation: + + + +
+ Unit: + + + +
+
+ + + + + SOGo Server - +
+ Client: +
+ Raw :
+
+
+
+
+
+
+ + -
- clientObject: + +
+ clientObject: +
\ No newline at end of file diff --git a/SOGo/UI/Contacts/UIxContactsListView.wox b/SOGo/UI/Contacts/UIxContactsListView.wox index 62a70caa..fa03ffbe 100644 --- a/SOGo/UI/Contacts/UIxContactsListView.wox +++ b/SOGo/UI/Contacts/UIxContactsListView.wox @@ -18,6 +18,7 @@ text-align: left; } + dateFormatter == nil) { - self->dateFormatter = \ - [[SOGoDateFormatter alloc] initWithLocale:[self locale]]; - [self->dateFormatter setFullWeekdayNameAndDetails]; - } - return self->dateFormatter; + if (self->dateFormatter == nil) { + self->dateFormatter = + [[SOGoDateFormatter alloc] initWithLocale:[self locale]]; + [self->dateFormatter setFullWeekdayNameAndDetails]; + } + return self->dateFormatter; } - (NSCalendarDate *)startTime { @@ -60,31 +60,30 @@ } - (NSString *)resourcesAsString { - NSArray *resources, *cns; + NSArray *resources, *cns; - resources = [[self appointment] resources]; - cns = [resources valueForKey:@"cnForDisplay"]; - return [cns componentsJoinedByString:@"
"]; + resources = [[self appointment] resources]; + cns = [resources valueForKey:@"cnForDisplay"]; + return [cns componentsJoinedByString:@"
"]; } - /* backend */ - (SOGoAppointment *)appointment { - NSString *iCalString; + NSString *iCalString; - if (self->appointment) - return self->appointment; + if (self->appointment) + return self->appointment; - iCalString = [[self clientObject] valueForKey:@"iCalString"]; - if (![iCalString isNotNull] || [iCalString length] == 0) { - [self debugWithFormat:@"ERROR(%s): missing iCal string!", + iCalString = [[self clientObject] valueForKey:@"iCalString"]; + if (![iCalString isNotNull] || [iCalString length] == 0) { + [self debugWithFormat:@"ERROR(%s): missing iCal string!", __PRETTY_FUNCTION__]; - return nil; - } + return nil; + } - self->appointment = [[SOGoAppointment alloc] initWithICalString:iCalString]; - return self->appointment; + self->appointment = [[SOGoAppointment alloc] initWithICalString:iCalString]; + return self->appointment; }