2004-08-27 Helge Hess <helge.hess@skyrix.com>
+
+ * SOGoContactObject.[hm]: can now decode the property list stored in
+ the store (v0.9.2)
* started implementation of contact folders (v0.9.1)
--- /dev/null
+
+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
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__ */
@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 */
# $Id$
-SUBMINOR_VERSION:=1
+SUBMINOR_VERSION:=2
2004-08-27 Helge Hess <helge.hess@skyrix.com>
+ * 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
<link type="text/css" rel="stylesheet" rsrc:href="calendar.css"/>
<link href="mailto:hh@skyrix.com" rev="made"/>
</head>
- <body>
- <div style="padding: 5px;">
- <a var:href="calendarRootURL">Calendar</a> |
- <a var:href="contactsRootURL">Addressbook</a>
- </div>
- <table cellpadding="0" cellspacing="0" border="0" width="100%">
- <tr>
- <td class="linecolor">
- <img rsrc:src="line_left.gif"/>
- </td>
- <td class="linecolor" width="100%">
- <img rsrc:src="line_stretch.gif"/>
- </td>
- <td class="linecolor">
- <img rsrc:src="line_right.gif"/>
- </td>
- </tr>
- <tr>
- <td colspan="3"/>
- </tr>
- </table>
+ <body>
<table cellpadding="5" cellspacing="0" border="0" width="100%">
<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
- <td valign="bottom">
- <var:component className="UIxAppNavView" />
+ <td valign="bottom" style="font-size: 10pt;">
+ <a var:href="calendarRootURL">Calendar</a> |
+ <a var:href="contactsRootURL">Addressbook</a>
</td>
<td align="right">
<a href="http://www.opengroupware.org:80/" target="OGo">
</td>
<td class="linecolor"><img rsrc:src="line_right.gif"/></td>
</tr>
+ <tr>
+ <td valign="top" colspan="3">
+ <var:component className="UIxAppNavView" />
+ </td>
+ </tr>
</table>
</td>
</tr>
# $Id$
-SUBMINOR_VERSION:=18
+SUBMINOR_VERSION:=19
/*
- 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
@interface UIxContactView : UIxComponent
{
-
}
- (BOOL)isDeletableClientObject;
@end
+#include <Contacts/SOGoContactObject.h>
#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 {
return [self redirectToLocation:url];
}
-@end
+@end /* UIxContactView */
className="UIxPageFrame"
title="name"
>
+ <table id="skywintable"
+ class="wintable"
+ cellspacing="0"
+ cellpadding="5"
+ width="100%"
+ >
+ <tr>
+ <td class="wintitle">
+ <table cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td width="5"/>
+ <td class="wintitle">
+ <!-- localize me -->
+ <span class="window_label">Address Viewer</span>
+ </td>
+ <td width="36" align="right" valign="center">
+ <var:component className="UIxWinClose"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table border="0" cellpadding="2" width="100%" cellspacing="0">
+ <tr bgcolor="#e8e8e0">
+ <td align="left">
+ <span class="aptview_title"
+ ><var:string value="clientObject.cn"/></span>
+ </td>
+ <td align="right" >
+ <table border='0' cellpadding='0' cellspacing='1'>
+ <tr>
+ <td class="button_auto_env" nowrap="true"
+ valign='middle' align='center'>
+ <a class="button_auto" href="edit"
+ var:queryDictionary="queryParameters">edit</a>
+ </td>
+ <td class="button_auto_env" nowrap="true"
+ valign='middle' align='center'>
+ <a class="button_auto" href="delete"
+ var:queryDictionary="queryParameters">delete</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" width="100%">
+ <table width="100%" border="0" cellpadding="4" cellspacing="0">
+ <!-- general contact info -->
+ <tr valign="top">
+ <td align="right" width="15%" bgcolor="#E8E8E0">
+ <span class="aptview_text">Name:</span>
+ </td>
+ <td align="left" bgcolor="#FFFFF0">
+ <span class="aptview_text">
+ <var:string value="clientObject.cn" />
+ </span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td align="right" width="15%" bgcolor="#E8E8E0">
+ <span class="aptview_text">Location:</span>
+ </td>
+ <td align="left" bgcolor="#FFFFF0">
+ <span class="aptview_text">
+ <var:string value="clientObject.l" />
+ </span>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" width="100%">
+ <uix:tabview var:selection="tabSelection"
+ const:tabStyle="tab"
+ const:selectedTabStyle="tab_selected"
+ const:bodyStyle="tabview_body"
+ >
+ <uix:tab const:key="attributes"
+ const:label="attributes"
+ var:href="attributesTabLink"
+ >
+ <table width="100%" border="0" cellpadding="4" cellspacing="0">
+ <tr valign="top">
+ <td align="right" width="15%" bgcolor="#E8E8E0">
+ <span class="aptview_text">E-Mail:</span>
+ </td>
+ <td align="left" bgcolor="#FFFFF0">
+ <span class="aptview_text">
+ <var:string value="clientObject.mail"/></span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td align="right" width="15%" bgcolor="#E8E8E0">
+ <span class="aptview_text">Phone:</span>
+ </td>
+ <td align="left" bgcolor="#FFFFF0">
+ <span class="aptview_text">
+ <var:string value="clientObject.telephoneNumber"/></span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td align="right" width="15%" bgcolor="#E8E8E0">
+ <span class="aptview_text">Organisation:</span>
+ </td>
+ <td align="left" bgcolor="#FFFFF0">
+ <span class="aptview_text">
+ <var:string value="clientObject.o"/></span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td align="right" width="15%" bgcolor="#E8E8E0">
+ <span class="aptview_text">Unit:</span>
+ </td>
+ <td align="left" bgcolor="#FFFFF0">
+ <span class="aptview_text">
+ <var:string value="clientObject.ou"/></span>
+ </td>
+ </tr>
+ </table>
+ </uix:tab>
+
+ <var:if condition="isUIxDebugEnabled">
+ <uix:tab const:key="debug"
+ const:label="DEBUG"
+ var:href="debugTabLink">
+ <small>
+ SOGo Server - <var:string value="name"/>
+ <br />
+ Client: <var:string value="clientObject"/>
+ <hr />
+ Raw :<br />
+ <pre><var:string value="clientObject.contentAsString"/></pre>
+ </small>
+ </uix:tab>
+ </var:if>
+ </uix:tabview>
+ </td>
+ </tr>
+ </table>
+
+
<var:if condition="isUIxDebugEnabled">
- <hr />
- clientObject: <var:string value="clientObject" />
+ <small>
+ <hr />
+ clientObject: <var:string value="clientObject" />
+ </small>
</var:if>
</var:component>
\ No newline at end of file
text-align: left;
}
</style>
+
<table id="skywintable"
class="wintable"
cellspacing="0"
}
- (SOGoDateFormatter *)dateFormatter {
- if(self->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 {
}
- (NSString *)resourcesAsString {
- NSArray *resources, *cns;
+ NSArray *resources, *cns;
- resources = [[self appointment] resources];
- cns = [resources valueForKey:@"cnForDisplay"];
- return [cns componentsJoinedByString:@"<br />"];
+ resources = [[self appointment] resources];
+ cns = [resources valueForKey:@"cnForDisplay"];
+ return [cns componentsJoinedByString:@"<br />"];
}
-
/* 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;
}