]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@251 d1b88da0-ebda-0310-925b-ed51d...
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 16 Aug 2004 10:03:52 +0000 (10:03 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 16 Aug 2004 10:03:52 +0000 (10:03 +0000)
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/UIxAppointmentProposal.m
SOGo/UI/Scheduler/UIxAppointmentProposal.wox
SOGo/UI/Scheduler/Version

index 270023d2dab006832914dbf3e273ac8cf181d5bc..81f93be179e64298927a117615c68e9ac08d21b3 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-16  Helge Hess  <helge.hess@skyrix.com>
+
+       * UIxAppointmentProposal: added duration popup (v0.9.57)
+
 2004-08-16  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.56
index ca55acb1af863860d62800ab0d7984f44fce544a..fb04a770924c5475bc0ccf58a9a9733efad842dd 100644 (file)
@@ -32,6 +32,7 @@
   NSCalendarDate *endDate;
   NSArray        *participants; /* array of iCalPerson's */
   NSArray        *resources;    /* array of iCalPerson's */
+  id             duration;
 }
 
 @end
@@ -41,6 +42,7 @@
 @implementation UIxAppointmentProposal
 
 - (void)dealloc {
+  [self->duration     release];
   [self->startDate    release];
   [self->endDate      release];
   [self->participants release];
   return self->endDate;
 }
 
+- (void)setDuration:(id)_duration {
+  ASSIGN(self->duration, _duration);
+}
+- (id)duration {
+  return self->duration;
+}
+- (int)durationInMinutes {
+  return [[self duration] intValue];
+}
+- (NSTimeInterval)durationAsTimeInterval {
+  return [self durationInMinutes] * 60;
+}
+
+- (NSString *)itemDurationText {
+  // TODO: use a formatter
+  switch ([[self item] intValue]) {
+  case  30: return @"30 minutes";
+  case  60: return @"1 hour";
+  case 120: return @"2 hours";
+  default:
+    return [NSString stringWithFormat:@"%@ minutes", [self item]];
+  }
+}
+
 - (void)setParticipants:(NSArray *)_parts {
   ASSIGN(self->participants, _parts);
 }
   return [NSArray arrayWithObjects:@"2004-08-15", nil];
 }
 
+- (NSArray *)durationSteps {
+  // TODO: make configurable
+  return [NSArray arrayWithObjects:@"30", @"60", @"120", nil];
+}
+
 /* slots */
 
 - (BOOL)isFirstHalfGreen {
index 493c9875e8c3ae24f522db806bc2a00148c60631..b7ef0b5ed2cf1df44058be790f8d593e02852f61 100644 (file)
                     <var:string label:value="Duration" />:
                   </td>
                   <td align="left" bgcolor="#FFFFF0" class="aptview_text" >
-                    duration popup here
+                    <var:popup list="durationSteps" item="item"
+                               string="itemDurationText"
+                               selection="duration" />
                   </td>
                 </tr>
                 <tr><td colspan="2"> </td></tr>
index 30fb2be909d9708e00e5d73fd081af30a00e947a..5d43ba69d50685404adc850565ef62d4f5893a27 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
-SUBMINOR_VERSION:=56
+SUBMINOR_VERSION:=57
 
 # v0.9.41 requires libNGObjWeb     v4.2.431
 # v0.9.31 requires libWEExtensions v4.2.52