]> err.no Git - scalable-opengroupware.org/commitdiff
added some vCard support
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 13 Jul 2005 14:54:14 +0000 (14:54 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 13 Jul 2005 14:54:14 +0000 (14:54 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@739 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Common/UIxTabItem.m
SOGo/UI/Contacts/ChangeLog
SOGo/UI/Contacts/UIxContactEditorBase.m
SOGo/UI/Contacts/Version
SOGo/UI/Templates/ChangeLog
SOGo/UI/Templates/ContactsUI/UIxContactEditor.wox
SOGo/UI/Templates/ContactsUI/UIxContactView.wox

index 46a4cb7131f832ff5742f6699ccf65517c416096..70add19dbc3f6b8df2eee5173e882d2f138af487 100644 (file)
@@ -18,7 +18,6 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
 
 #include "UIxTabView.h"
 #include "common.h"
index aa3202405d7a462649b389c2c311691c4b4fdcb4..584c15148c9c88c244fc97942aa4be531f5ce195 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-13  Helge Hess  <helge.hess@opengroupware.org>
+
+       * UIxContactEditorBase.m: added a safeguard for vCard contacts
+         (v0.9.24)
+
 2005-06-26  Helge Hess  <helge.hess@opengroupware.org>
 
        * created a library containing shared base classes (for
index f1b3ad64fb0224f516547409e83ec1141f698495..e2ec3a00249dfaf6562df4163a6fb70af1b14030 100644 (file)
 
 - (void)loadValuesFromContentString:(NSString *)_s {
   NSDictionary *plist;
+
+  if ([_s hasPrefix:@"BEGIN:VCARD"]) {
+    // TODO: load vCard values
+    [self errorWithFormat:@"Editing of vCard's is not yet supported!"];
+    return;
+  }
   
   if ((plist = [_s propertyList]) == nil) {
     [self errorWithFormat:@"could not parse content string!"];
index 09d4f5bfbc4c8f5dda6de8b2b018e580035df790..097fb071ecacfe46f2e29ea6692bc7ef84c2cceb 100644 (file)
@@ -1,6 +1,6 @@
 # GNUstep makefile
 
-SUBMINOR_VERSION:=23
+SUBMINOR_VERSION:=24
 
 # v0.9.18 requires NGExtensions v4.5.136
 # v0.9.16 requires libSOGoUI    v0.9.16
index 1b50054bc551f0cf3c69f4352429e577cdb26491..e87c1c98cd56bbcf391988f99c1f0f057f1410be 100644 (file)
@@ -1,5 +1,11 @@
 2005-07-13  Helge Hess  <helge.hess@opengroupware.org>
 
+       * ContactsUI/UIxContactEditor.wox: disable editing when being used on
+         a vCard contact
+
+       * ContactsUI/UIxContactView.wox: added support for displaying vCard
+         attributes
+
        * ContactsUI/UIxContactsListView.wox, UIxMailContactList.wox: changed
          to use c_name instead of cName (as required by new GDLContentStore)
 
index fb20ce623accc702007e98f974a8a1c690318253..64c83fc3575b006793102d62958bcb39d1ed2369 100644 (file)
       </tr>
       <tr>
         <td>
+          <var:if condition="clientObject.isVCardRecord">
+            <h4>Editing of vCards is not yet supported!</h4>
+          </var:if>
+
+  <var:if condition="clientObject.isVCardRecord" const:negate="1">
           <table border="0" cellpadding="2" cellspacing="0" class="editsec">
             <tr>
               <td align="right" colspan="2">
@@ -56,7 +61,8 @@
                                const:extraAttributes="cn, givenName,telephoneNumber,facsimileTelephoneNumber,mobile,postalAddress,homePostalAddress,departmentNumber,l"
                 />
               </td>
-            </tr><tr>
+            </tr>
+            <tr>
               <td align="left" colspan="2">
                 <span class="aptview_title">
                   <var:string label:value="Common" />
               </td>
             </tr>
           </table>
+  </var:if>
         </td>
       </tr>
+  <var:if condition="clientObject.isVCardRecord" const:negate="1">
       <tr>
         <td>
             <input type="submit" label:value="Save" name="save:method" />
             </var:if>
         </td>
       </tr>
+  </var:if>
     </table>
     
     <input type="hidden" name="content" var:value="contentString" />
index 1ab7b9145edd07c4da7a3ae77cb7857f77075a9f..d00fac1ef7c1c196e3f6ef57554b1c78b91e86a3 100644 (file)
@@ -7,10 +7,7 @@
                className="UIxPageFrame"
                title="name"
 >
-  <table id="skywintable"
-         class="wintable"
-         cellspacing="0"
-         cellpadding="5"
+  <table id="skywintable" class="wintable" cellspacing="0" cellpadding="5"
          width="100%"
   >
     <tr>
         <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>
+              <span class="aptview_title">
+               <var:if condition="clientObject.isVCardRecord" const:negate="1">
+                 <var:string value="clientObject.cn"/>
+               </var:if>
+               <var:if condition="clientObject.isVCardRecord">
+                 <var:string label:value="vCard" />:
+                 <var:string value="clientObject.vCard.fn"/>
+               </var:if>
+              </span>
             </td>
             <td align="right" >
               <table border='0' cellpadding='0' cellspacing='1'>
@@ -66,6 +70,7 @@
   <tr>
     <td valign="top" width="100%">
       <table width="100%" border="0" cellpadding="4" cellspacing="0">
+       <var:if condition="clientObject.isVCardRecord" const:negate="1">
         <!-- general contact info -->
         <tr valign="top">
           <td align="right" width="15%" bgcolor="#E8E8E0">
             </span>
           </td>
         </tr>
+       </var:if>
       </table>
-   </td>
-  </tr>
-  <tr>
-    <td valign="top" width="100%">
+      </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"
+          <!-- ******************** Tab for PLists ******************* -->
+       
+          <var:if condition="clientObject.isVCardRecord" const:negate="1">
+           <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">
                 </td>
               </tr>
             </table>
-          </uix:tab>
+           </uix:tab>
+          </var:if>
+
+          <!-- ******************** Tab for vCards ******************* -->
+
+          <var:if condition="clientObject.isVCardRecord">
+           <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"
+                  ><var:string label:value="EMail" />:</span>
+                </td>
+                <td align="left" bgcolor="#FFFFF0">
+                  <span class="aptview_text">
+                    <var:string
+                       value="clientObject.vCard.preferredEMail.stringValue"/>
+                  </span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td align="right" width="15%" bgcolor="#E8E8E0">
+                  <span class="aptview_text"
+                  ><var:string label:value="Phone" />:</span>
+                </td>
+                <td align="left" bgcolor="#FFFFF0">
+                  <span class="aptview_text">
+                    <var:string
+                      value="clientObject.vCard.preferredTel.stringValue"/>
+                  </span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td align="right" width="15%" bgcolor="#E8E8E0">
+                  <span class="aptview_text"
+                  ><var:string label:value="Address" />:</span>
+                </td>
+                <td align="left" bgcolor="#FFFFF0">
+                  <span class="aptview_text">
+                    <var:string
+                      value="clientObject.vCard.preferredAdr.street"/><br />
+                    <var:string
+                      value="clientObject.vCard.preferredAdr.locality"/><br />
+                    <var:string
+                      value="clientObject.vCard.preferredAdr.country"/><br />
+                  </span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td align="right" width="15%" bgcolor="#E8E8E0">
+                  <span class="aptview_text"
+                  ><var:string label:value="Role" />:</span>
+                </td>
+                <td align="left" bgcolor="#FFFFF0">
+                  <span class="aptview_text">
+                    <var:string value="clientObject.vCard.role"/></span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td align="right" width="15%" bgcolor="#E8E8E0">
+                  <span class="aptview_text"
+                  ><var:string label:value="Title" />:</span>
+                </td>
+                <td align="left" bgcolor="#FFFFF0">
+                  <span class="aptview_text">
+                    <var:string value="clientObject.vCard.title"/></span>
+                </td>
+              </tr>
+
+              <tr valign="top">
+                <td align="right" width="15%" bgcolor="#E8E8E0">
+                  <span class="aptview_text"
+                  ><var:string label:value="Note" />:</span>
+                </td>
+                <td align="left" bgcolor="#FFFFF0">
+                  <span class="aptview_text">
+                    <var:string value="clientObject.vCard.note"/></span>
+                </td>
+              </tr>
+            </table>
+           </uix:tab>
+          </var:if>
+
+          <!-- ******************** Debugging Tab ******************** -->
 
           <var:if condition="isUIxDebugEnabled">
             <uix:tab const:key="debug"