]> err.no Git - scalable-opengroupware.org/commitdiff
new layout
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 23 Dec 2004 03:27:34 +0000 (03:27 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 23 Dec 2004 03:27:34 +0000 (03:27 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@484 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/English.lproj/default.strings
SOGo/UI/Scheduler/UIxCalScheduleOverview.m
SOGo/UI/Scheduler/UIxCalScheduleOverview.wox
SOGo/UI/Scheduler/Version

index 105655d8c9a27d96afa73261fee54e2cbc12dddc..1c5ffc69791485b200be027dac6231f22b8a621c 100644 (file)
@@ -1,3 +1,13 @@
+2004-12-23  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.109
+
+       * UIxCalScheduleOverview.[wox,m]: changed the UI to the final proposal
+         agreed upon by Laurent.
+       
+       * English.lproj/default.strings: renamed value for "action", suited to
+         new UI Layout
+
 2004-12-22  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.108
index eea0128552caf32db848f60f4121e8103e847d5d..478ba4a09823e755d45504bc54cd535ab190112e 100644 (file)
@@ -93,7 +93,7 @@
 "Meetings proposed by you" = "Meetings proposed by you";
 "Meetings proposed to you" = "Meetings proposed to you";
 "sched_startDateFormat" = "%d.%m. %H:%M";
-"action"               = "Your Status";
+"action"               = "Action";
 "accept"               = "Accept";
 "decline"              = "Decline";
 "more participants"     = "more participants";
index e0c3127fe54782defb5a8c05956baa4886833645..2f490e8e75e7a0c29cce74329e3167e7583fbcf2 100644 (file)
   NSMutableArray *userApts;
   NSMutableArray *foreignApts;
   id             item;
-  NSArray        *partNames;
-  NSArray        *partStates;
+  NSMutableArray *partNames;
+  NSMutableArray *partStates;
   NSString       *userParticipationStatus;
   unsigned       participantIndex;
+  unsigned       userIndex;
 }
 
 - (NSCalendarDate *)startDate;
 /* accessors */
 
 - (void)setItem:(id)_item {
-  NSString *ps;
-
+  NSString *ps, *email;
+  NSArray  *partmails;
+  unsigned idx;
+  
   ASSIGN(self->item, _item);
 
-  [self->partNames release];
+  [self->partNames  release];
   [self->partStates release];
   ps               = [self->item valueForKey:@"participants"];
-  self->partNames  = [[ps componentsSeparatedByString:@"\n"] retain];
+  self->partNames  = [[ps componentsSeparatedByString:@"\n"] mutableCopy];
   ps               = [self->item valueForKey:@"partstates"];
-  self->partStates = [[ps componentsSeparatedByString:@"\n"] retain];
+  self->partStates = [[ps componentsSeparatedByString:@"\n"] mutableCopy];
+  ps               = [self->item valueForKey:@"partmails"];
+  partmails        = [ps componentsSeparatedByString:@"\n"];
+
+  /* reorder partNames/partStates */
+  
+  /* ensure organizer is first entry */
+  email = [self->item valueForKey:@"orgmail"];
+  if ([email isNotNull]) {
+    idx = [partmails indexOfObject:email];
+    if (idx != NSNotFound && idx != 0) {
+      id obj;
+
+      obj = [self->partNames objectAtIndex:idx];
+      [self->partNames insertObject:obj atIndex:0]; /* frontmost */
+      [self->partNames removeObjectAtIndex:idx + 1];
+      obj = [self->partStates objectAtIndex:idx];
+      [self->partStates insertObject:obj atIndex:0]; /* frontmost */
+      [self->partStates removeObjectAtIndex:idx + 1];
+    }
+  }
+  /* user is either second, first or none at all */
+  [self->userParticipationStatus release];
+  email     = [self emailForUser];
+  idx       = [partmails indexOfObject:email];
+  if (idx != NSNotFound && idx != 0 && idx != 1) {
+    id obj;
+
+    self->userIndex = 1;
+    obj = [self->partNames objectAtIndex:idx];
+    [self->partNames insertObject:obj atIndex:self->userIndex]; /* second */
+    [self->partNames removeObjectAtIndex:idx + 1];
+    obj = [self->partStates objectAtIndex:idx];
+    [self->partStates insertObject:obj atIndex:self->userIndex]; /* second */
+    [self->partStates removeObjectAtIndex:idx + 1];
+  }
+  else {
+    self->userIndex = idx;
+  }
+  if (self->userIndex != NSNotFound)
+    self->userParticipationStatus =
+      [[self->partStates objectAtIndex:self->userIndex] retain];
+  else
+    self->userParticipationStatus = nil;
 }
 - (id)item {
   return self->item;
   return self->participantIndex;
 }
 
+- (unsigned)userIndex {
+  return self->userIndex;
+}
+
 - (BOOL)isFirstParticipant {
   return self->participantIndex == 0 ? YES : NO;
 }
 }
 
 - (NSString *)userParticipationStatus {
-  if (!self->userParticipationStatus) {
-    NSString *pms;
-    NSArray  *partmails;
-    unsigned idx;
-    
-    pms       = [self->item valueForKey:@"partmails"];
-    partmails = [pms componentsSeparatedByString:@"\n"];
-    idx       = [partmails indexOfObject:[self emailForUser]];
-    if (idx == NSNotFound)
-      self->userParticipationStatus = @"";
-    self->userParticipationStatus =
-      [[self->partStates objectAtIndex:idx] retain];
-  }
-  return userParticipationStatus;
+  return self->userParticipationStatus;
 }
 
 
index e28ab2bd3cd94acabd139a2f5722aafded16d0f8..50b7bdcd5326e8e9587f1f5a5c721dd0c7e2ec26 100644 (file)
                                                partStat="participationStatus"
                                 />
                               </td>
-                              <var:if condition="isFirstParticipant">
-                                <td class="schedoverview"
-                                    var:rowspan="rowspan"
+                              <td class="schedoverview">
+                                <var:if-key const:key="participantIndex"
+                                            value="userIndex"
                                 >
-                                  <p class="schedoverview">
-                                    <var:component className="UIxCalParticipationStatusView"
-                                                   partStat="userParticipationStatus"
-                                    />
-                                  </p>
-                                  
-                                    <var:if-key const:key="userParticipationStatus"
-                                                const:value="1"
-                                                const:negate="YES"
-                                    >  
-                                      <a var:href="acceptAppointmentURL"
-                                         class="button_auto"
-                                      ><var:string label:value="accept" /></a>
-                                    </var:if-key>
-                                    <var:if-key const:key="userParticipationStatus"
-                                                const:value="2"
-                                                const:negate="YES"
-                                    >  
-                                      <a var:href="declineAppointmentURL"
-                                         class="button_auto"
-                                      ><var:string label:value="decline" /></a>
-                                    </var:if-key>
-                                  
-                                </td>
-                              </var:if>
+                                  <var:if-key const:key="userParticipationStatus"
+                                              const:value="1"
+                                              const:negate="YES"
+                                  >  
+                                    <a var:href="acceptAppointmentURL"
+                                       class="button_auto"
+                                    ><var:string label:value="accept" /></a>
+                                  </var:if-key>
+                                  <var:if-key const:key="userParticipationStatus"
+                                              const:value="2"
+                                              const:negate="YES"
+                                  >  
+                                    <a var:href="declineAppointmentURL"
+                                       class="button_auto"
+                                    ><var:string label:value="decline" /></a>
+                                  </var:if-key>
+                                </var:if-key>
+                              </td>
                             </tr>
                           </var:foreach>
                           <var:if condition="didTruncateParticipants">
index c10fc5798907d1081fdae53810b09fb96437002f..79c0acacd2f16c2b3c82808bb99735aa965a15f5 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
-SUBMINOR_VERSION:=108
+SUBMINOR_VERSION:=109
 
 # v0.9.107 requires WOExtensions v4.5.21
 # v0.9.105 requires NGObjWeb     v4.5.102