+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
}
- (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]];
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]];
><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>
# $Id$
-SUBMINOR_VERSION:=54
+SUBMINOR_VERSION:=55
# v0.9.41 requires libNGObjWeb v4.2.431
# v0.9.31 requires libWEExtensions v4.2.52