]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1151 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 20 Aug 2007 21:55:51 +0000 (21:55 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 20 Aug 2007 21:55:51 +0000 (21:55 +0000)
19 files changed:
ChangeLog
NEWS
SoObjects/Contacts/SOGoContactGCSFolder.m
SoObjects/Mailer/SOGoMailAccounts.m
SoObjects/Mailer/SOGoMailBodyPart.m
SoObjects/Mailer/SOGoMailObject.m
UI/Common/GNUmakefile
UI/Contacts/GNUmakefile
UI/Contacts/UIxContactsListView.m
UI/MailPartViewers/GNUmakefile
UI/MailPartViewers/UIxMailPartViewer.m
UI/MailerUI/GNUmakefile
UI/MainUI/GNUmakefile
UI/PreferencesUI/English.lproj/Localizable.strings
UI/PreferencesUI/French.lproj/Localizable.strings
UI/PreferencesUI/GNUmakefile
UI/Templates/ContactsUI/UIxContactsListView.wox
UI/Templates/MailPartViewers/UIxMailPartLinkViewer.wox
UI/WebServerResources/SchedulerUI.js

index 385a4d19f0278fa4702746d38afc30aa8721b4ee..da37d536465db8c46f732dce9f7ce6b031dfc68a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 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
diff --git a/NEWS b/NEWS
index e3542840b9376947e1877e72c8c730c002e9fbc5..db619da5a6cac89a4461a46bcf52dde28ae876de 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@
   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
 --------------
index 7228ac6286e3cde142237559d34cf0a3ebce5e09..47eb5f13c20737037513d9eb81830082cc5f4505 100644 (file)
 #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"];
 
index 09a8cfd6412fdc98ed148ab0a36ee4f85fd3398e..66e2948befa2e6b6628635ff5a3355102e911114 100644 (file)
@@ -55,7 +55,11 @@ static NSString *AgenorShareLoginMarker  = @".-.";
 
 - (BOOL) isValidMailAccountName: (NSString *) _key
 {
-  return ([_key length] > 0);
+  NSArray *accounts;
+
+  accounts = [[context activeUser] mailAccounts];
+
+  return [[accounts objectsForKey: @"name"] containsObject: _key];
 }
 
 - (id) mailAccountWithName: (NSString *) _key
index 15bc9dd5efffe89aa9e40635d6d2807c238a5f13..fb11b0191a3408e73033eb13aa159845466dbaed 100644 (file)
@@ -131,39 +131,36 @@ static BOOL debugOn = NO;
 
 /* 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 */
index 5921f289c6485badf65d055bc03a395e88f3e150..c99b1b0b304b33fbe616f100cf68dcdfd6e9b830 100644 (file)
@@ -224,7 +224,7 @@ static BOOL debugSoParts       = NO;
 
   if (!coreInfos)
     {  
-      msgs = [self fetchParts:coreInfoKeys]; // returns dict
+      msgs = [self fetchParts: coreInfoKeys]; // returns dict
       if (heavyDebug)
        [self logWithFormat: @"M: %@", msgs];
       msgs = [msgs valueForKey: @"fetch"];
index 455202c2059ca8cddc22ac8c557f030694beaa39..ebdc4fea97e6d55147db098dcbaf32eac4c54b79 100644 (file)
@@ -6,7 +6,7 @@ BUNDLE_NAME = CommonUI
 
 CommonUI_PRINCIPAL_CLASS = CommonUIProduct
 
-CommonUI_LANGUAGES = English French
+CommonUI_LANGUAGES = English French German
 
 CommonUI_OBJC_FILES +=         \
        CommonUIProduct.m       \
index 6f7ae7e86869800baa90aec8f1da2af1c8e92d3f..34a2f8fc74836f4ce53be507a84b9d23b5d3337c 100644 (file)
@@ -6,7 +6,7 @@ BUNDLE_NAME = ContactsUI
 
 ContactsUI_PRINCIPAL_CLASS = ContactsUIProduct
 
-ContactsUI_LANGUAGES = English French
+ContactsUI_LANGUAGES = English French German
 
 ContactsUI_OBJC_FILES =                        \
        UIxContactsUserFolders.m \
index 940cbaa55d58c17fa91e31e57f9d246aeda09418..45dadfa6204ca7e634ba450be8bc813b901565bc 100644 (file)
@@ -21,6 +21,7 @@
 
 #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";
index 1850ca57d651d514e54c6d71f6c7b4ddc8a4ec78..ae6a49d2459ae4754eb43b806be3bf419446dad4 100644 (file)
@@ -6,9 +6,7 @@ BUNDLE_NAME = MailPartViewers
 
 MailPartViewers_PRINCIPAL_CLASS = MailPartViewersProduct
 
-MailPartViewers_LANGUAGES = English French
-
-MailPartViewers_LANGUAGES = English French
+MailPartViewers_LANGUAGES = English French German
 
 MailPartViewers_OBJC_FILES += \
        MailPartViewersProduct.m        \
index e44980ea2d23630417100e1ab9a30f4266630e66..36c2a1ad783013ebde498891aa1cc25912c9d067 100644 (file)
   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;
 }
index cc8411a8b508b5aa1cad9c56d905571ec3a68c3e..7a7c36b490f670212e268d05cdbe79e38355a24d 100644 (file)
@@ -6,7 +6,7 @@ BUNDLE_NAME = MailerUI
 
 MailerUI_PRINCIPAL_CLASS = MailerUIProduct
 
-MailerUI_LANGUAGES = English French
+MailerUI_LANGUAGES = English French German
 
 MailerUI_OBJC_FILES += \
        MailerUIProduct.m       \
index 7d053e5b534d140ff959a533ce360d5adc97cbed..83e84c1803de847f496cf349e8cab523f9e094d6 100644 (file)
@@ -6,7 +6,7 @@ BUNDLE_NAME = MainUI
 
 MainUI_PRINCIPAL_CLASS = MainUIProduct
 
-MainUI_LANGUAGES = English French
+MainUI_LANGUAGES = English French German
 
 MainUI_OBJC_FILES += \
        MainUIProduct.m         \
index 28a5e75301aa61a6b8b5bdb46fc955ea5bbbcb99..bbf714638020017dea11bada93602ba5ce17fcfb 100644 (file)
@@ -61,8 +61,8 @@
 "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";
index 74b46dd5f7fec6facab14b34db88e962c3d07719..f61bb331e04c0d7cb2772f2a6c0a0caa98247122 100644 (file)
@@ -58,8 +58,8 @@
 "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";
index 86fe28270853016b35669c8dbbabcf6137dc60b2..2f8eaba0dcc283489f87d495ae437957701e7ff3 100644 (file)
@@ -6,7 +6,7 @@ BUNDLE_NAME = PreferencesUI
 
 PreferencesUI_PRINCIPAL_CLASS = PreferencesUIProduct
 
-PreferencesUI_LANGUAGES = English French
+PreferencesUI_LANGUAGES = English French German
 
 PreferencesUI_OBJC_FILES =             \
        PreferencesUIProduct.m          \
index bbaa16612574fa7660c679d452076d594d7bb539..cd535d8de640485ee3c32d46089e722e01ff7efa 100644 (file)
@@ -28,7 +28,7 @@
 
         <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);"
index 452bb2ecf2cc275cf00d278f4457c1b36b235817..f08af1f3c6eab626913dab54eec313e4afd4bc44 100644 (file)
@@ -1,13 +1,16 @@
 <?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 />
@@ -34,6 +37,6 @@
     Subtype: <var:string value="bodyInfo.subtype" /><br />
     Path:    <var:string value="pathToAttachment" /><br />
     PartPath: <var:string value="partPath" /><br />
--->
+    -->
   </div>
 </div>
index 7eb2d2dcc46c15f41ac063038aece17a96e4a53f..9eae73497a68e530af662857925b62e8a02e92b1 100644 (file)
@@ -313,8 +313,8 @@ function eventsListCallback(http) {
       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();