]> err.no Git - scalable-opengroupware.org/commitdiff
more contact work
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 27 Aug 2004 00:03:23 +0000 (00:03 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 27 Aug 2004 00:03:23 +0000 (00:03 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@279 d1b88da0-ebda-0310-925b-ed51d893ca5b

12 files changed:
SOGo/SoObjects/Contacts/ChangeLog
SOGo/SoObjects/Contacts/README [new file with mode: 0644]
SOGo/SoObjects/Contacts/SOGoContactObject.h
SOGo/SoObjects/Contacts/SOGoContactObject.m
SOGo/SoObjects/Contacts/Version
SOGo/UI/Common/ChangeLog
SOGo/UI/Common/UIxPageFrame.wox
SOGo/UI/Common/Version
SOGo/UI/Contacts/UIxContactView.m
SOGo/UI/Contacts/UIxContactView.wox
SOGo/UI/Contacts/UIxContactsListView.wox
SOGo/UI/Scheduler/UIxAppointmentView.m

index 3b21ef60c903e13447fc8bb38bd678c292b57624..dd949d5461703a944c65077f52a1025adf199619 100644 (file)
@@ -1,4 +1,7 @@
 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)
 
diff --git a/SOGo/SoObjects/Contacts/README b/SOGo/SoObjects/Contacts/README
new file mode 100644 (file)
index 0000000..03b4f53
--- /dev/null
@@ -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 
index 6a532da8075b6ef969736de589bf21269b26803b..2290d3347ef566212c8f0cd812c1c87be05e5ae6 100644 (file)
         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__ */
index cbd6b6cb5dfcb2ebeaae3338e6e43daf35ee0527..c446ce5bca72727d2fb1799d7c6faa635bdcd2b2 100644 (file)
 @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 */
 
index 237a59049190fb100f4d3a877ebcfed082bc30dc..1bf86739af6e070f2b3946837285f951d5e6a275 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=1
+SUBMINOR_VERSION:=2
index 376866e8b86eecc92218f3e3963404f4f5318804..be46224a1c07005888da60a8c1ad5970d173c216 100644 (file)
@@ -1,5 +1,9 @@
 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
index 82efe4dd78b1f29022d7cee13f7fce110f366792..0c6815eb5cbfac5e9b503f8985759201ab564a2e 100644 (file)
     <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>
index cd35ad0fc7134df7fcc93aab18344f258f338c2b..93c8cd1ddfe4862984d2fe8dffb82de3a02d010b 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=18
+SUBMINOR_VERSION:=19
index 97bd85dfcaef14bf14703deee544c7ca100b465e..dc4d565e89ddff6101d3058b85f587b1f78fa8f0 100644 (file)
@@ -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
 
 @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 */
index 7f53e297705a3f1445658fe412ecf84ee220902f..dac801aa5ec3f47f79b2b391e9b71dabd3ba76c0 100644 (file)
@@ -7,8 +7,159 @@
                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
index 62a70caa408adeb557f8702b30e2d4b19666a4dc..fa03ffbebf45c15da9d2d289ff2c66b4aa26b8aa 100644 (file)
@@ -18,6 +18,7 @@
       text-align: left;
     }
   </style>
+
   <table id="skywintable"
          class="wintable"
          cellspacing="0"
index 63ac54bd6964b3e29d18480d974a9a3aa739500d..c99cfce9726967a81d2464df2a36b5152ce4b2a2 100644 (file)
 }
 
 - (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;
 }