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

index 7b69aa181693b5076569ca9720d1eabdd8c46288..8b0273c27e142f0f3dc1359fed5f78d95c9c99b0 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-16  Helge Hess  <helge.hess@skyrix.com>
+
+       * v0.9.55
+
+       * UIxAppointmentProposal.m: load default start/enddates
+       
+       * UIxAppointmentEditor.m: add default start/enddates
+       
 2004-08-15  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.54
index 579373553635a6dd6351b39c9191ab5ca9b5c2e8..dd8363fa7b05581f56d98546011741de3e8dd079 100644 (file)
 }
 
 - (void)loadValuesFromAppointment:(SOGoAppointment *)_appointment {
-  self->startDate = [[_appointment startDate] copy];
-  self->endDate   = [[_appointment endDate]   copy];
+  if ((self->startDate = [[_appointment startDate] copy]) == nil)
+    self->startDate = [[[[NSCalendarDate date] date] hour:11 minute:0] copy];
+  if ((self->endDate = [[_appointment endDate]   copy]) == nil) {
+    self->endDate =
+      [[self->startDate hour:[self->startDate hourOfDay]+1 minute:0] copy];
+  }
   [self->startDate setTimeZone:[self viewTimeZone]];
   [self->endDate   setTimeZone:[self viewTimeZone]];
   
index 92ed59c893005f476ec0e1ce94213580a6197c35..ca55acb1af863860d62800ab0d7984f44fce544a 100644 (file)
   return self->resources;
 }
 
+- (NSArray *)attendees {
+  NSArray *a, *b;
+  
+  a = [self participants];
+  b = [self resources];
+  if ([b count] == 0) return a;
+  if ([a count] == 0) return b;
+  return [a arrayByAddingObjectsFromArray:b];
+}
+
 - (void)setCurrentDay:(id)_day {
   ASSIGN(self->currentDay, _day);
 }
   return [NSArray arrayWithObjects:@"2004-08-15", nil];
 }
 
+/* slots */
+
+- (BOOL)isFirstHalfGreen {
+  [self logWithFormat:@"is first green: %@ %@", self->currentDay, self->item];
+  return NO;
+}
+- (BOOL)isSecondHalfGreen {
+  [self logWithFormat:@"is second green: %@ %@", self->currentDay, self->item];
+  return YES;
+}
+
+- (BOOL)isFirstHalfBlocked {
+  return [self isFirstHalfGreen] ? NO : YES;
+}
+- (BOOL)isSecondHalfBlocked {
+  return [self isSecondHalfGreen] ? NO : YES;
+}
+
 /* actions */
 
 - (BOOL)shouldTakeValuesFromRequest:(WORequest *)_rq inContext:(WOContext*)_c{
   return YES;
 }
 
+- (id)defaultAction {
+  NSCalendarDate *now;
+  
+  now = [NSCalendarDate date];
+
+  [self setStartDate:[now hour:9 minute:0]];
+  [self setEndDate:[now hour:18 minute:0]];
+  
+  return self;
+}
+
 - (id)proposalSearchAction {
   [self logWithFormat:@"search from %@ to %@", 
          [self startDate], [self endDate]];
index 42ee2516b07c2ecfb48c0e20e5b980f37e210374..a16607a6f6ed253bb869ef671ba0343d9d19e85d 100644 (file)
                           ><var:string value="currentDay" /></font>
                   </td>
                   <var:foreach list="hours" item="item">
-                    <td align="left" bgcolor="#FAE8B8" valign="top">
-                      <a href="#"><img rsrc:src="green_corner.gif" alt="new" 
-                                       border="0" /></a>
-                    </td>
-                    <td align="middle" bgcolor="#FFAAAA" valign="middle"> </td>
+                    <var:if condition="isFirstHalfGreen">
+                      <td align="left" bgcolor="#FAE8B8" valign="top">
+                        <a href="#"><img rsrc:src="green_corner.gif" alt="new" 
+                                         border="0" /></a>
+                      </td>
+                    </var:if>
+                    <var:if condition="isFirstHalfBlocked">
+                      <td align="middle" bgcolor="#FFAAAA" valign="middle">
+                      </td>
+                   </var:if>
+
+                    <var:if condition="isSecondHalfGreen">
+                      <td align="left" bgcolor="#FAE8B8" valign="top">
+                        <a href="#"><img rsrc:src="green_corner.gif" alt="new" 
+                                         border="0" /></a>
+                      </td>
+                    </var:if>
+                    <var:if condition="isSecondHalfBlocked">
+                      <td align="middle" bgcolor="#FFAAAA" valign="middle">
+                      </td>
+                   </var:if>
                   </var:foreach>
                 </tr>
               </var:foreach>
index a96e7c7451282e412ae15dc3bf4c68f14d747628..8518823caac5ecf305d62a490046d5fb7576da9c 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
-SUBMINOR_VERSION:=54
+SUBMINOR_VERSION:=55
 
 # v0.9.41 requires libNGObjWeb     v4.2.431
 # v0.9.31 requires libWEExtensions v4.2.52