}
- (void)_calcMatrixInContext:(WOContext *)_ctx {
+ // THREAD: uses temporary ivars
WOComponent *comp;
NSCalendarDate *startWeek;
NSCalendarDate *endWeek;
idx = floor((diff / SecondsPerWeek) * 14);
- if ((self->item) && (self->isInfoItem)) {
+ if ((self->item != nil) && (self->isInfoItem)) {
[self->item setValue:app inComponent:comp];
isInfo = [[self->isInfoItem valueInComponent:comp] boolValue];
}
- else isInfo = NO;
+ else
+ isInfo = NO;
if ((0 <= idx) && (idx < 14)) {
if (isInfo) {
/* P.M.Infos */
[self takeValues:_req mode:WEWeekOverview_PMInfoMode modeId:@"p" ctx:_ctx];
+ // THREAD: uses temporary ivars
[self _calcMatrixInContext:_ctx];
[_ctx setObject:@"YES" forKey:WEWeekOverview_ContentMode];
headers = [self->headerRows valueInComponent:comp];
idx = [sectionId intValue];
if (idx >= (int)[headers count]) {
- NSLog(@"WARNING! WEWeekOverview: wrong headerrow index");
+ [self warnWithFormat:@"WEWeekOverview: wrong headerrow index"];
}
else {
result = [self invokeActionForHeader:_req
footers = [self->footerRows valueInComponent:comp];
idx = [sectionId intValue];
if (idx >= (int)[footers count]) {
- NSLog(@"WARNING! WEWeekOverview: wrong footerrow index");
+ [self warnWithFormat:@"WEWeekOverview: wrong footerrow index"];
}
else {
result = [self invokeActionForFooter:_req
showWeekend = (self->hideWeekend != nil)
? [self->hideWeekend boolValueInComponent:comp] ? NO : YES
: YES;
-
+
+ // TODO: use CSS over here
[_response appendContentString:
@"<table border=\""];
[_response appendContentString:b]; // border
/*** append AM content row + saturday ***/
[_response appendContentString:@"<tr>"];
-
+
/* AM weekdays content (this is count=10 because we slot 0=AM/1=PM, etc) */
for (i = 0; i < 10; i = i + 2) {
if ([self->dayIndex isValueSettable])