sourceTree = "<group>";
tabWidth = 8;
};
+ AD71091206F1D4C900A5926E = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.gif;
+ path = first.gif;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ AD71091306F1D4C900A5926E = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.gif;
+ path = green_corner.gif;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ AD71091406F1D4C900A5926E = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.gif;
+ path = icon_popupcalendar.gif;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ AD71091506F1D4C900A5926E = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.gif;
+ path = invisible_space_2.gif;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ AD71091606F1D4C900A5926E = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.gif;
+ path = last.gif;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ AD71091706F1D4C900A5926E = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.gif;
+ path = next.gif;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ AD71091806F1D4C900A5926E = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.gif;
+ path = previous.gif;
+ refType = 4;
+ sourceTree = "<group>";
+ };
AD7379B206AEBB2500735920 = {
fileEncoding = 4;
isa = PBXFileReference;
ADF15BF806BA839B0047D955,
ADF15BF906BA839B0047D955,
ADF15BFA06BA839B0047D955,
+ AD71091406F1D4C900A5926E,
E87208D10692E3D30099CBBD,
E87208D20692E3D30099CBBD,
+ AD71091206F1D4C900A5926E,
+ AD71091606F1D4C900A5926E,
+ AD71091806F1D4C900A5926E,
+ AD71091706F1D4C900A5926E,
+ AD71091306F1D4C900A5926E,
+ AD71091506F1D4C900A5926E,
);
isa = PBXGroup;
path = images;
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:rsrc="OGo:url"
- class="button_auto_env"
+ class="button_submit_env"
>
<script language="JavaScript">
<var:string value="jsCode" const:escapeHTML="NO" />
</script>
<a var:href="jsFunctionHref"
- class="button_auto"
+ class="button_submit"
><var:string value="title" /></a>
</span>
const:division="TEST"
/>
</td>
- <td id="addMeToo" class="button_auto_env" var:style="meTooStyle">
+ <td id="addMeToo" class="button_submit_env" var:style="meTooStyle">
<a href="javascript:addMeToo()"
- class="button_auto"
+ class="button_submit"
><var:string label:value="me too" /></a>
</td>
- <td id="clearUidList" class="button_auto_env">
+ <td id="clearUidList" class="button_submit_env">
<a href="javascript:clearUidList()"
- class="button_auto"
+ class="button_submit"
><var:string label:value="clear" /></a>
</td>
- <td id="showUidList" class="button_auto_env">
+ <td id="showUidList" class="button_submit_env">
<form var:href="showHref">
<input type="hidden"
name="anaisUIDString"
+2004-09-10 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * AnaisSelector.wox, AnaisUidSelector.wox: use the new button_submit
+ in order to look more pleasing (v0.9.12)
+
2004-09-10 Helge Hess <helge.hess@skyrix.com>
* AnaisAttendeeSelector.wox: fixed missing label namespace (v0.9.11)
# $Id: Version 165 2004-08-05 17:55:50Z znek $
-SUBMINOR_VERSION:=11
+SUBMINOR_VERSION:=12
+2004-09-10 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * uix.css: new button_submit style for the Anais selector, looks
+ similar to the mozilla submit button now (v0.9.24)
+
2004-09-09 Marcus Mueller <znek@mulle-kybernetik.com>
* UIxPageFrame.wox: display clientObject and object traversal stack
# $Id$
-SUBMINOR_VERSION:=23
+SUBMINOR_VERSION:=24
overflow: hidden;
}
+.button_submit_env {
+ height: 24px;
+ text-align: center;
+ vertical-align: middle;
+ padding: 0px 0px 0px 0px;
+ margin: 0px 0px 0px 0px;
+ overflow: hidden;
+}
+
+.button_submit_env a {
+ text-decoration: none;
+ color: #000000;
+}
+
+.button_submit_env a:hover {
+ text-decoration: underline;
+ color: #ff0000;
+}
+
+.button_submit {
+ height: 30px;
+ border-style: outset;
+ border-color: #DDDDDD;
+ border-width: 2px;
+ color: #000000;
+ background-color: #e8e8e0;
+ font-size: 8pt;
+ font-family: Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+ letter-spacing: 0pt;
+ text-decoration: none;
+ text-color: #000000;
+ text-align: center;
+ vertical-align: middle;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-top: 2px;
+ padding-bottom: 3px;
+ overflow: hidden;
+}
/* header */
+2004-09-10 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * v0.9.81
+
+ * GNUmakefile, product.plist: added new image
+
+ * images/invisible_space_2.gif: new transparent image used by
+ UIxWeekListview.wox
+
+ * UIxCalDayView.m: rewrote -isCurrentDateInApt: to use
+ NGCalendarDateRange
+
+ * UIxCalWeekListview.[m|wox]: implemented
+
+ * UIxCalWeekColumnsview.[m|wox]: implemented
+
+ * UIxCalWeekOverview.m: removed impl. of -appointments, moved to
+ superclass
+
+ * UIxCalWeekView.m: added impl. of -appointments
+
2004-09-10 Helge Hess <helge.hess@skyrix.com>
* UIxAppointmentPrintview.wox, UIxAppointmentView.wox: added missing
images/next.gif \
images/last.gif \
images/green_corner.gif \
+ images/invisible_space_2.gif \
SchedulerUI_LOCALIZED_RESOURCE_FILES += \
default.strings \
- (NSArray *)uids {
if(!self->uids) {
- self->uids = [[[self clientObject] calendarUIDs] retain];
+ self->uids = [[[[self clientObject] calendarUIDs]
+ sortedArrayUsingSelector:@selector(compareAscending:)]
+ retain];
}
return self->uids;
}
#import "UIxCalDayView.h"
+#include "common.h"
#include <EOControl/EOControl.h>
+#include <NGExtensions/NGCalendarDateRange.h>
+
@interface UIxCalDayView (PrivateAPI)
- (BOOL)isCurrentDateInApt:(id)_apt;
- (NSArray *)_getDatesFrom:(NSCalendarDate *)_from to:(NSCalendarDate *)_to;
@end
-#include "common.h"
-
@implementation UIxCalDayView
- (void)dealloc {
}
- (BOOL)isCurrentDateInApt:(id)_apt {
- NSCalendarDate *start, *end, *aptStartDate, *aptEndDate;
-
- start = self->currentDate;
- end = [start dateByAddingYears:0
- months:0
- days:0
- hours:0
- minutes:59
- seconds:59];
+ NSCalendarDate *dateStart, *dateEnd, *aptStart, *aptEnd;
+ NGCalendarDateRange *dateRange, *aptRange;
- aptStartDate = [_apt valueForKey:@"startDate"];
- aptEndDate = [_apt valueForKey:@"endDate"];
-
- /* does apt fully enclose start/end? */
- if([start isGreaterThanOrEqualTo:aptStartDate] &&
- [end isLessThanOrEqualTo:aptEndDate])
- return YES;
- if([aptStartDate isGreaterThanOrEqualTo:start] &&
- [aptStartDate isLessThan:end])
- return YES;
- if([aptEndDate isGreaterThan:start] &&
- [aptEndDate isLessThanOrEqualTo:end])
- return YES;
-
- return NO;
+ dateStart = self->currentDate;
+ dateEnd = [dateStart dateByAddingYears:0 months:0 days:0
+ hours:1 minutes:0 seconds:0];
+ dateRange = [NGCalendarDateRange calendarDateRangeWithStartDate:dateStart
+ endDate:dateEnd];
+ aptStart = [self->appointment valueForKey:@"startDate"];
+ aptEnd = [self->appointment valueForKey:@"endDate"];
+ aptRange = [NGCalendarDateRange calendarDateRangeWithStartDate:aptStart
+ endDate:aptEnd];
+ return [dateRange doesIntersectWithDateRange:aptRange];
}
- (NSArray *)dateRange {
@interface UIxCalWeekChartview : UIxCalWeekView
{
+ int day;
+ int hour;
+ NSArray *hours;
}
+- (NSCalendarDate *)currentDate;
@end
#include "common.h"
+#include <NGExtensions/NGCalendarDateRange.h>
+#include <SOGoLogic/AgenorUserManager.h>
+#include <sys/param.h> // MIN, MAX
@implementation UIxCalWeekChartview
+
+- (void)dealloc {
+ [self->hours release];
+ [super dealloc];
+}
+
+- (void)setDay:(int)_day {
+ NSCalendarDate *date;
+
+ self->day = _day;
+
+ date = [[self startDate] dateByAddingYears:0 months:0 days:_day];
+ [self setCurrentDay:date];
+}
+- (int)day {
+ return self->day;
+}
+
+- (void)setHour:(int)_hour {
+ self->hour = _hour;
+}
+- (int)hour {
+ return self->hour;
+}
+
+- (NSCalendarDate *)currentDate {
+ NSCalendarDate *date;
+
+ date = [[self startDate] beginOfDay];
+ date = [date dateByAddingYears:0 months:0 days:[self day]
+ hours:[self hour] minutes:0 seconds:0];
+ return date;
+}
+
+/* columns */
+
+- (NSArray *)columns {
+ static NSMutableArray *columns = nil;
+
+ if(!columns) {
+ unsigned i, count;
+
+ count = [self shouldDisplayWeekend] ? 7 : 5;
+ columns = [[NSMutableArray alloc] initWithCapacity:count];
+ for(i = 0; i < count; i++) {
+ [columns addObject:[NSNumber numberWithInt:i]];
+ }
+ }
+ return columns;
+}
+
+/* tests */
+
+/* row is active, if apt intersects hour range */
+- (BOOL)isRowActive {
+ NSCalendarDate *aptStart, *aptEnd;
+ int aptStartHour, aptEndHour;
+
+ aptStart = [self->appointment valueForKey:@"startDate"];
+ aptEnd = [self->appointment valueForKey:@"endDate"];
+ aptStartHour = [aptStart hourOfDay];
+ aptEndHour = [aptEnd hourOfDay];
+
+ return (([self hour] >= aptStartHour) &&
+ ([self hour] <= aptEndHour));
+}
+
+/* item is active, if apt's dateRange intersects the range
+of the current column (currentDay is set to be this date) */
+- (BOOL)isItemActive {
+ NSCalendarDate *dateStart, *dateEnd, *aptStart, *aptEnd;
+ NGCalendarDateRange *dateRange, *aptRange;
+
+ dateStart = [self currentDate];
+ dateEnd = [dateStart dateByAddingYears:0 months:0 days:0
+ hours:1 minutes:0 seconds:0];
+ dateRange = [NGCalendarDateRange calendarDateRangeWithStartDate:dateStart
+ endDate:dateEnd];
+ aptStart = [self->appointment valueForKey:@"startDate"];
+ aptEnd = [self->appointment valueForKey:@"endDate"];
+ aptRange = [NGCalendarDateRange calendarDateRangeWithStartDate:aptStart
+ endDate:aptEnd];
+ return [dateRange doesIntersectWithDateRange:aptRange];
+}
+
+/* hours */
+
+- (NSArray *)hours {
+ if(!self->hours) {
+ NSMutableArray *result;
+ NSArray *apts;
+ unsigned i, count;
+ unsigned min, max;
+
+ min = [self dayStartHour];
+ max = [self dayEndHour];
+
+ apts = [self appointments];
+ count = [apts count];
+ for(i = 0; i < count; i++) {
+ id apt;
+ NSCalendarDate *aptStart, *aptEnd;
+ apt = [apts objectAtIndex:i];
+ aptStart = [apt valueForKey:@"startDate"];
+ if(aptStart) {
+ min = MIN(min, [aptStart hourOfDay]);
+ }
+ aptEnd = [apt valueForKey:@"endDate"];
+ if(aptEnd) {
+ max = MAX(max, [aptEnd hourOfDay]);
+ }
+ }
+ result = [[NSMutableArray alloc] initWithCapacity:max - min];
+ for(i = min; i <= max; i++) {
+ [result addObject:[NSNumber numberWithInt:i]];
+ }
+ self->hours = result;
+ }
+ return self->hours;
+}
+
+/* descriptions */
+
+- (NSString *)shortTextForApt {
+ return [[self appointment] valueForKey:@"title"];
+}
+
+/* style sheet */
+
+- (NSString *)titleStyle {
+ if([self->currentDay isToday])
+ return @"weekoverview_title_hilite";
+ return @"weekoverview_title";
+}
+
@end /* UIxCalWeekChartview */
<!-- $Id: SkyNews.html,v 1.3 2003/12/22 16:53:55 helge Exp $ -->
<table id="skywintable" class="wintable" cellspacing="0" cellpadding="5" width="100%">
- <tr>
- <td class="wintitle">
- <table cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td width="5"/>
- <td class="wintitle"><var:component className="UIxCalDateLabel" startDate="startDate" endDate="endDate" const:selection="week" /></td>
- <td width="36" align="right" valign="center">
- <var:component className="UIxWinClose" />
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td id="skywinbodycell" class="wincontent">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr bgcolor="#e8e8e0">
- <td align="left" valign="middle" width="80%">
- <var:component className="AnaisUidSelector"
- calendarUIDs="clientObject.calendarUIDs"
- />
- </td><!-- 99% -->
- <td align="right">
- <var:component className="UIxCalBackForthNavView"
- methodName="ownMethodName"
- prevQueryParameters="prevWeekQueryParameters"
- currentQueryParameters="todayQueryParameters"
- nextQueryParameters="nextWeekQueryParameters"
- label:label="this week"
- />
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td id="skywinbodycell" class="wincontent">
- <table border="0" width="100%" cellpadding="0" cellspacing="0">
- <tr>
- <td colspan="2">
- <var:component className="UIxCalSelectTab"
- const:selection="week"
- currentDate="selectedDate"
- >
- <table border="0" cellpadding="4" width="100%" cellspacing="2">
+ <tr>
+ <td class="wintitle">
+ <table cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td width="1%" align="left" valign="middle" bgcolor="#e8e8e0">
- <table border='0' cellpadding='0' cellspacing='0'>
- <tr>
- <td><a href="weekoverview"
- var:queryDictionary="queryParameters"
- ><img rsrc:src="icon_view_overview.gif"
- label:title="Overview"
- label:alt="Overview"
- border="0"
- valign="top"
- /></a></td>
- <td><img rsrc:src="icon_view_chart_inactive.gif"
- label:title="Chart"
- label:alt="Chart"
- border="0"
- valign="top"
- /></td>
- <td><a href="weeklistview"
- var:queryDictionary="queryParameters"
- ><img rsrc:src="icon_view_list.gif"
- label:title="List"
- label:alt="List"
- border="0"
- valign="top"
- /></a></td>
- <td>
- <a href="weekcolumnsview"
- var:queryDictionary="queryParameters"
- ><img rsrc:src="icon_view_columns.gif"
- label:title="Columns"
- label:alt="Columns"
- border="0"
- valign="top"
- /></a></td>
- </tr>
- </table>
+ <td width="5"/>
+ <td class="wintitle"><var:component className="UIxCalDateLabel"
+ startDate="startDate"
+ endDate="endDate"
+ const:selection="week"
+ /></td>
+ <td width="36" align="right" valign="center">
+ <var:component className="UIxWinClose" />
</td>
-
- <td align="right" bgcolor="#e8e8e0">
- <table border='0' cellpadding='0' cellspacing='1'>
- <tr>
- <td class="button_auto_env" nowrap="true" valign='middle'
- align='center'>
- <a class="button_auto"
- href="weekprintview"
- var:queryDictionary="queryParameters"
- target="SOGoPrintView"
- ><var:string label:value="printview" /></a>
- </td>
- <td class="button_auto_env" nowrap="true" valign='middle'
- align='center'>
- <a class="button_auto"
- href="proposal"
- var:queryDictionary="queryParameters"
- ><var:string label:value="proposal" /></a>
- </td>
- </tr>
- </table>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="skywinbodycell" class="wincontent">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr bgcolor="#e8e8e0">
+ <td align="left" valign="middle" width="80%">
+ <var:component className="AnaisUidSelector"
+ calendarUIDs="clientObject.calendarUIDs"
+ />
+ </td><!-- 99% -->
+ <td align="right">
+ <var:component className="UIxCalBackForthNavView"
+ methodName="ownMethodName"
+ prevQueryParameters="prevWeekQueryParameters"
+ currentQueryParameters="todayQueryParameters"
+ nextQueryParameters="nextWeekQueryParameters"
+ label:label="this week"
+ />
</td>
</tr>
</table>
-
- <var:week-overview list="appointments"
- item="appointment"
- weekStart="startDate"
- dayIndex="dayIndex"
- const:startDateKey="startDate"
- const:endDateKey="endDate"
- const:titleStyle="weekoverview_title"
- contentStyle="contentStyle"
- >
- <var:week-title>
- <table cellpadding="0" width="100%" border="0" cellspacing="0"
- var:class="titleStyle">
+ </td>
+ </tr>
+ <tr>
+ <td id="skywinbodycell" class="wincontent">
+ <table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
- <td align="left" valign="top">
- <a href="dayoverview"
- var:queryDictionary="currentDayQueryParameters"
- class="weekoverview_title_daylink"
- ><var:string value="currentDay.dayOfMonth" /></a>
+ <td colspan="2">
+ <var:component className="UIxCalSelectTab"
+ const:selection="week"
+ currentDate="selectedDate"
+ >
+ <table border="0" cellpadding="4" width="100%" cellspacing="2">
+ <tr>
+ <td width="1%" align="left" valign="middle" bgcolor="#e8e8e0">
+ <table border='0' cellpadding='0' cellspacing='0'>
+ <tr>
+ <td><a href="weekoverview"
+ var:queryDictionary="queryParameters"
+ ><img rsrc:src="icon_view_overview.gif"
+ label:title="Overview"
+ label:alt="Overview"
+ border="0"
+ valign="top"
+ /></a></td>
+ <td><img rsrc:src="icon_view_chart_inactive.gif"
+ label:title="Chart"
+ label:alt="Chart"
+ border="0"
+ valign="top"
+ /></td>
+ <td><a href="weeklistview"
+ var:queryDictionary="queryParameters"
+ ><img rsrc:src="icon_view_list.gif"
+ label:title="List"
+ label:alt="List"
+ border="0"
+ valign="top"
+ /></a></td>
+ <td>
+ <a href="weekcolumnsview"
+ var:queryDictionary="queryParameters"
+ ><img rsrc:src="icon_view_columns.gif"
+ label:title="Columns"
+ label:alt="Columns"
+ border="0"
+ valign="top"
+ /></a></td>
+ </tr>
+ </table>
+ </td>
+ <td align="right" bgcolor="#e8e8e0">
+ <table border='0' cellpadding='0' cellspacing='1'>
+ <tr>
+ <td class="button_auto_env"
+ nowrap="true"
+ valign='middle'
+ align='center'
+ >
+ <a class="button_auto"
+ href="weekprintview"
+ var:queryDictionary="queryParameters"
+ target="SOGoPrintView"
+ ><var:string label:value="printview" /></a>
+ </td>
+ <td class="button_auto_env"
+ nowrap="true"
+ valign='middle'
+ align='center'
+ >
+ <a class="button_auto"
+ href="proposal"
+ var:queryDictionary="queryParameters"
+ ><var:string label:value="proposal" /></a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <var:vspan-matrix list="appointments"
+ item="appointment"
+ rows="hours"
+ row="hour"
+ columns="columns"
+ column="day"
+ itemActive="isItemActive"
+ isRowActive="isRowActive"
+ const:rowHeight="8"
+ const:width="100%"
+ const:border="0"
+ const:cellpadding="0"
+ const:cellspacing="2"
+ >
+ <var:matrix-label const:elementName="td"
+ const:position="top"
+ const:align="center"
+ >
+ <table cellpadding="5"
+ cellspacing="0"
+ width="100%"
+ border="0"
+ var:class="titleStyle"
+ >
+ <tr>
+ <td align="left" valign="top">
+ <a href="daychartview"
+ var:queryDictionary="currentDayQueryParameters"
+ class="weekoverview_title_daylink"
+ ><var:string value="currentDay.dayOfMonth"
+ const:numberformat="02"
+ /></a>
+ </td>
+ <td align="center" valign="top" width="97%">
+ <var:string value="currentDayName" /><br />
+ [<a href="new"
+ var:queryDictionary="currentDayQueryParameters"
+ class="weekoverview_title_newlink"
+ ><var:string label:value="new" /></a>]
+ </td>
+ </tr>
+ </table>
+ </var:matrix-label>
+
+ <var:matrix-label const:elementName="td"
+ const:position="left"
+ const:width="2"
+ const:height="20"
+ const:bgcolor="#d6d6ce"
+ >
+ <span class="dayoverview_content_time_link">
+ <var:string value="currentDate"
+ const:dateformat="%H:%M"
+ />
+ </span>
+ </var:matrix-label>
+ <!-- TODO: use css instead! -->
+ <var:matrix-empty const:elementName="td"
+ const:bgcolor="#efefe7"
+ ><var:entity const:name="nbsp"
+ />
+ </var:matrix-empty>
+ <!-- TODO: use css instead! -->
+ <var:matrix-cell const:elementName="td"
+ const:bgcolor="#d6d6ce"
+ const:align="top"
+ >
+ <span class="dayoverview_content_time_link">
+ <a var:href="appointmentViewURL"
+ var:queryDictionary="currentDateQueryParameters"
+ var:title="tooltipForApt"
+ var:class="aptStyle"
+ ><var:string value="shortTextForApt"
+ const:escapeHTML="NO"
+ /></a>
+ </span>
+ </var:matrix-cell>
+ </var:vspan-matrix>
+ </var:component>
</td>
- <td align="center" valign="top" width="97%">
- <var:string value="currentDayName" /><br />
- [<a href="new"
- var:queryDictionary="currentDayQueryParameters"
- class="weekoverview_title_newlink"
- ><var:string label:value="new" /></a>]
+ </tr>
+ <tr bgcolor="#F5F5E9">
+ <td align="left" width="10"><var:entity const:name="nbsp"/></td>
+ <td align="right"
+ ><img border="0"
+ alt=""
+ src="/sogod.woa/so/ControlPanel/Products/CommonUI/Resources/corner_right.gif"
+ /></td>
+ </tr>
+ <tr>
+ <td colspan="2" bgcolor="#F5F5E9">
+ <table border="0" width="100%" cellpadding="10" cellspacing="0">
+ <tr />
+ </table>
</td>
</tr>
</table>
- </var:week-title>
- <var:if condition="hasDayInfo">
- <var:week-info>
- <var:if condition="hasHolidayInfo">
- <var:string value="holidayInfo"
- const:class="weekoverview_holidayinfo" />
- </var:if>
- <var:foreach list="allDayApts" item="appointment">
- <a var:href="appointmentViewURL"
- var:queryDictionary="currentDayQueryParameters"
- ><var:string value="shortTextForApt"
- const:escapeHTML="NO"
- /></a>
- </var:foreach>
- </var:week-info>
- </var:if>
- <var:week>
- <a var:href="appointmentViewURL"
- ><small><var:string value="shortTextForApt"
- const:escapeHTML="NO"
- /></small></a><br />
- </var:week>
- </var:week-overview>
- </var:component>
- </td>
- </tr>
- <tr bgcolor="#F5F5E9">
- <td align="left" width="10"><var:entity const:name="nbsp"/></td>
- <td align="right"><img
- border="0" alt=""
- src="/sogod.woa/so/ControlPanel/Products/CommonUI/Resources/corner_right.gif" /></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#F5F5E9">
- <table border="0" width="100%" cellpadding="10" cellspacing="0">
- <tr />
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
+ </td>
+ </tr>
</table>
- <!--
- <hr />
- <var:string value="thisWeekQueryParameters" />
- -->
- <!--
- <hr/>
-
- Appointments:
- <var:component className="UIxAptTableView" appointments="appointments"/>
- -->
- <!-- pre><var:string value="appointments" const:insertBR="YES"/></pre -->
-
</var:component>
@implementation UIxCalWeekColumnsview
-- (NSArray *)appointments {
- return [self fetchCoreInfos];
-}
-
- (void)setDayIndex:(char)_idx {
NSCalendarDate *d;
@interface UIxCalWeekListview : UIxCalWeekView
{
+ NSArray *uids;
+ id currentUid;
+ int column;
}
+- (int)columnsPerDay;
+
@end
#include "common.h"
+#include <NGExtensions/NGCalendarDateRange.h>
+#include <SOGoLogic/AgenorUserManager.h>
@implementation UIxCalWeekListview
+
+- (void)dealloc {
+ [self->uids release];
+ [self->currentUid release];
+ [super dealloc];
+}
+
+- (NSArray *)uids {
+ if(!self->uids) {
+ self->uids = [[[[self clientObject] calendarUIDs]
+ sortedArrayUsingSelector:@selector(compareAscending:)]
+ retain];
+ }
+ return self->uids;
+}
+
+- (void)setCurrentUid:(id)_currentUid {
+ ASSIGN(self->currentUid, _currentUid);
+}
+- (id)currentUid {
+ return self->currentUid;
+}
+
+/* column corresponds to the current day/hour */
+- (void)setColumn:(int)_column {
+ unsigned dayOfWeek, hour;
+ NSCalendarDate *date;
+
+ dayOfWeek = _column / [self columnsPerDay];
+ hour = _column % [self columnsPerDay];
+
+ date = [[self startDate] dateByAddingYears:0 months:0 days:dayOfWeek];
+ date = [date hour:hour minute:0];
+ /* let's reuse currentDay, although this isn't named too accurately */
+ [self setCurrentDay:date];
+ self->column = _column;
+}
+- (int)column {
+ return self->column;
+}
+
+/* columns */
+
+- (int)columnsPerDay {
+ return 24;
+}
+
+- (NSArray *)columns {
+ static NSMutableArray *columns = nil;
+
+ if(!columns) {
+ unsigned i, count;
+
+ if([self shouldDisplayWeekend])
+ count = [self columnsPerDay] * 7;
+ else
+ count = [self columnsPerDay] * 5;
+
+ columns = [[NSMutableArray alloc] initWithCapacity:count];
+ for(i = 0; i < count; i++) {
+ [columns addObject:[NSNumber numberWithInt:i]];
+ }
+ }
+ return columns;
+}
+
+/* tests */
+
+/* row is active, if currentUid is participant of apt */
+- (BOOL)isRowActive {
+ AgenorUserManager *um;
+ NSString *mailChunk;
+ NSString *currentMail;
+
+ um = [AgenorUserManager sharedUserManager];
+ currentMail = [um getEmailForUID:self->currentUid];
+ mailChunk = [self->appointment valueForKey:@"partmails"];
+ if([mailChunk rangeOfString:currentMail].length > 0)
+ return YES;
+ return NO;
+}
+
+/* item is active, if apt's dateRange intersects the range
+ of the current column (currentDay is set to be this date) */
+- (BOOL)isItemActive {
+ NSCalendarDate *dateStart, *dateEnd, *aptStart, *aptEnd;
+ NGCalendarDateRange *dateRange, *aptRange;
+
+ dateStart = [self currentDay];
+ dateEnd = [dateStart dateByAddingYears:0 months:0 days:0
+ hours:1 minutes:0 seconds:0];
+ dateRange = [NGCalendarDateRange calendarDateRangeWithStartDate:dateStart
+ endDate:dateEnd];
+ aptStart = [self->appointment valueForKey:@"startDate"];
+ aptEnd = [self->appointment valueForKey:@"endDate"];
+ aptRange = [NGCalendarDateRange calendarDateRangeWithStartDate:aptStart
+ endDate:aptEnd];
+ return [dateRange doesIntersectWithDateRange:aptRange];
+}
+
+/* descriptions */
+
+- (NSString *)cnForCurrentUid {
+ return [[AgenorUserManager sharedUserManager] getCNForUID:self->currentUid];
+}
+
+- (NSString *)shortTextForApt {
+ return [[self appointment] valueForKey:@"title"];
+}
+
+/* style sheet */
+
+- (NSString *)titleStyle {
+ if([self->currentDay isToday])
+ return @"weekoverview_title_hilite";
+ return @"weekoverview_title";
+}
+
@end /* UIxCalWeekListview */
xmlns:label="OGo:label"
xmlns:uix="OGo:uix"
className="UIxPageFrame"
- title="name">
-
- <!-- $Id: SkyNews.html,v 1.3 2003/12/22 16:53:55 helge Exp $ -->
- <table id="skywintable" class="wintable"
- cellspacing="0" cellpadding="5" width="100%">
- <tr>
- <td class="wintitle">
- <table cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td width="5"/>
- <td class="wintitle"><var:component className="UIxCalDateLabel"
- startDate="startDate" endDate="endDate"
- const:selection="week" /></td>
- <td width="36" align="right" valign="center">
- <var:component className="UIxWinClose" />
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td id="skywinbodycell" class="wincontent">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr bgcolor="#e8e8e0">
- <td align="left" valign="middle" width="80%">
- <var:component className="AnaisUidSelector"
- calendarUIDs="clientObject.calendarUIDs"
- />
- </td><!-- 99% -->
- <td align="right">
- <var:component className="UIxCalBackForthNavView"
- methodName="ownMethodName"
- prevQueryParameters="prevWeekQueryParameters"
- currentQueryParameters="todayQueryParameters"
- nextQueryParameters="nextWeekQueryParameters"
- label:label="this week"
- />
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td id="skywinbodycell" class="wincontent">
- <table border="0" width="100%" cellpadding="0" cellspacing="0">
- <tr>
- <td colspan="2">
- <var:component className="UIxCalSelectTab"
- const:selection="week"
- currentDate="selectedDate"
- >
- <table border="0" cellpadding="4" width="100%" cellspacing="2">
+ title="name"
+>
+ <table id="skywintable"
+ class="wintable"
+ cellspacing="0"
+ cellpadding="5"
+ width="100%"
+ >
+ <tr>
+ <td class="wintitle">
+ <table cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td width="1%" align="left" valign="middle" bgcolor="#e8e8e0">
- <table border='0' cellpadding='0' cellspacing='0'>
- <tr>
- <td><a href="weekoverview"
- var:queryDictionary="queryParameters"
- ><img rsrc:src="icon_view_overview.gif"
- label:title="Overview"
- label:alt="Overview"
- border="0"
- valign="top"
- /></a></td>
- <td><a href="weekchartview"
- var:queryDictionary="queryParameters"
- ><img rsrc:src="icon_view_chart.gif"
- label:title="Chart"
- label:alt="Chart"
- border="0"
- valign="top"
- /></a></td>
- <td><img rsrc:src="icon_view_list_inactive.gif"
- label:title="List"
- label:alt="List"
- border="0"
- valign="top"
- /></td>
- <td>
- <a href="weekcolumnsview"
- var:queryDictionary="queryParameters"
- ><img rsrc:src="icon_view_columns.gif"
- label:title="Columns"
- label:alt="Columns"
- border="0"
- valign="top"
- /></a></td>
- </tr>
- </table>
+ <td width="5"/>
+ <td class="wintitle"><var:component className="UIxCalDateLabel"
+ startDate="startDate"
+ endDate="endDate"
+ const:selection="week"
+ /></td>
+ <td width="36" align="right" valign="center">
+ <var:component className="UIxWinClose" />
</td>
-
- <td align="right" bgcolor="#e8e8e0">
- <table border='0' cellpadding='0' cellspacing='1'>
- <tr>
- <td class="button_auto_env" nowrap="true" valign='middle'
- align='center'>
- <a class="button_auto"
- href="weekprintview"
- var:queryDictionary="queryParameters"
- target="SOGoPrintView"
- ><var:string label:value="printview" /></a>
- </td>
- <td class="button_auto_env" nowrap="true" valign='middle'
- align='center'>
- <a class="button_auto"
- href="proposal"
- var:queryDictionary="queryParameters"
- ><var:string label:value="proposal" /></a>
- </td>
- </tr>
- </table>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="skywinbodycell" class="wincontent">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr bgcolor="#e8e8e0">
+ <td align="left" valign="middle" width="80%">
+ <var:component className="AnaisUidSelector"
+ calendarUIDs="clientObject.calendarUIDs"
+ />
+ </td><!-- 99% -->
+ <td align="right">
+ <var:component className="UIxCalBackForthNavView"
+ methodName="ownMethodName"
+ prevQueryParameters="prevWeekQueryParameters"
+ currentQueryParameters="todayQueryParameters"
+ nextQueryParameters="nextWeekQueryParameters"
+ label:label="this week"
+ />
</td>
</tr>
</table>
-
- <var:week-overview list="appointments"
- item="appointment"
- weekStart="startDate"
- dayIndex="dayIndex"
- const:startDateKey="startDate"
- const:endDateKey="endDate"
- const:titleStyle="weekoverview_title"
- contentStyle="contentStyle"
- >
- <var:week-title>
- <table cellpadding="0" width="100%" border="0" cellspacing="0"
- var:class="titleStyle">
+ </td>
+ </tr>
+ <tr>
+ <td id="skywinbodycell" class="wincontent">
+ <table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
- <td align="left" valign="top">
- <a href="dayoverview"
- var:queryDictionary="currentDayQueryParameters"
- class="weekoverview_title_daylink"
- ><var:string value="currentDay.dayOfMonth" /></a>
+ <td colspan="2">
+ <var:component className="UIxCalSelectTab"
+ const:selection="week"
+ currentDate="selectedDate"
+ >
+ <table border="0"
+ cellpadding="4"
+ width="100%"
+ cellspacing="2"
+ >
+ <tr>
+ <td width="1%"
+ align="left"
+ valign="middle"
+ bgcolor="#e8e8e0"
+ >
+ <table border='0' cellpadding='0' cellspacing='0'>
+ <tr>
+ <td><a href="weekoverview"
+ var:queryDictionary="queryParameters"
+ ><img rsrc:src="icon_view_overview.gif"
+ label:title="Overview"
+ label:alt="Overview"
+ border="0"
+ valign="top"
+ /></a></td>
+ <td><a href="weekchartview"
+ var:queryDictionary="queryParameters"
+ ><img rsrc:src="icon_view_chart.gif"
+ label:title="Chart"
+ label:alt="Chart"
+ border="0"
+ valign="top"
+ /></a></td>
+ <td><img rsrc:src="icon_view_list_inactive.gif"
+ label:title="List"
+ label:alt="List"
+ border="0"
+ valign="top"
+ /></td>
+ <td>
+ <a href="weekcolumnsview"
+ var:queryDictionary="queryParameters"
+ ><img rsrc:src="icon_view_columns.gif"
+ label:title="Columns"
+ label:alt="Columns"
+ border="0"
+ valign="top"
+ /></a></td>
+ </tr>
+ </table>
+ </td>
+
+ <td align="right" bgcolor="#e8e8e0">
+ <table border='0' cellpadding='0' cellspacing='1'>
+ <tr>
+ <td class="button_auto_env" nowrap="true" valign='middle'
+ align='center'>
+ <a class="button_auto"
+ href="weekprintview"
+ var:queryDictionary="queryParameters"
+ target="SOGoPrintView"
+ ><var:string label:value="printview" /></a>
+ </td>
+ <td class="button_auto_env" nowrap="true" valign='middle'
+ align='center'>
+ <a class="button_auto"
+ href="proposal"
+ var:queryDictionary="queryParameters"
+ ><var:string label:value="proposal" /></a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <var:hspan-matrix list="appointments"
+ item="appointment"
+ rows="uids"
+ row="currentUid"
+ columns="columns"
+ column="column"
+ itemActive="isItemActive"
+ isRowActive="isRowActive"
+ const:rowHeight="8"
+ const:width="100%"
+ const:border="0"
+ const:cellpadding="0"
+ const:cellspacing="2"
+ >
+ <var:matrix-label const:elementName="td"
+ const:position="top"
+ const:align="center"
+ span="columnsPerDay"
+ >
+ <table cellpadding="2"
+ cellspacing="0"
+ width="100%"
+ border="0"
+ var:class="titleStyle"
+ >
+ <tr>
+ <td align="left" valign="top">
+ <a href="daylistview"
+ var:queryDictionary="currentDayQueryParameters"
+ class="weekoverview_title_daylink"
+ ><var:string value="currentDay.dayOfMonth"
+ const:numberformat="02"
+ /></a>
+ </td>
+ <td align="center" valign="top" width="97%">
+ <var:string value="currentDayName" /><br />
+ [<a href="new"
+ var:queryDictionary="currentDayQueryParameters"
+ class="weekoverview_title_newlink"
+ ><var:string label:value="new" /></a>]
+ </td>
+ </tr>
+ </table>
+ </var:matrix-label>
+
+ <var:matrix-label const:elementName="td"
+ const:position="left"
+ const:bgcolor="#d6d6ce"
+ const:width="100"
+ >
+ <var:string value="cnForCurrentUid"
+ const:style="dayoverview_content_time_link"
+ />
+ </var:matrix-label>
+ <!-- TODO: use css instead! -->
+ <var:matrix-empty const:elementName="td"
+ const:bgcolor="#efefe7"
+ ><var:entity const:name="nbsp"
+ />
+ </var:matrix-empty>
+ <var:matrix-label const:elementName="td"
+ const:position="bottom"
+ >
+ <img rsrc:src="invisible_space_2.gif" />
+ </var:matrix-label>
+ <!-- TODO: use css instead! -->
+ <var:matrix-cell const:elementName="td"
+ const:bgcolor="#d6d6ce"
+ const:align="top"
+ >
+ <span class="dayoverview_content_time_link">
+ <a var:href="appointmentViewURL"
+ var:queryDictionary="currentDateQueryParameters"
+ var:title="tooltipForApt"
+ var:class="aptStyle"
+ ><var:string value="shortTextForApt"
+ const:escapeHTML="NO"
+ /></a>
+ </span>
+ </var:matrix-cell>
+ </var:hspan-matrix>
+ </var:component>
</td>
- <td align="center" valign="top" width="97%">
- <var:string value="currentDayName" /><br />
- [<a href="new"
- var:queryDictionary="currentDayQueryParameters"
- class="weekoverview_title_newlink"
- ><var:string label:value="new" /></a>]
+ </tr>
+ <tr bgcolor="#F5F5E9">
+ <td align="left" width="10"><var:entity const:name="nbsp"/></td>
+ <td align="right"
+ ><img border="0"
+ alt=""
+ src="/sogod.woa/so/ControlPanel/Products/CommonUI/Resources/corner_right.gif"
+ /></td>
+ </tr>
+ <tr>
+ <td colspan="2" bgcolor="#F5F5E9">
+ <table border="0" width="100%" cellpadding="10" cellspacing="0">
+ <tr />
+ </table>
</td>
</tr>
</table>
- </var:week-title>
- <var:if condition="hasDayInfo">
- <var:week-info>
- <var:if condition="hasHolidayInfo">
- <var:string value="holidayInfo"
- const:class="weekoverview_holidayinfo" />
- </var:if>
- <var:foreach list="allDayApts" item="appointment">
- <a var:href="appointmentViewURL"
- var:queryDictionary="currentDayQueryParameters"
- ><var:string value="shortTextForApt"
- const:escapeHTML="NO"
- /></a>
- </var:foreach>
- </var:week-info>
- </var:if>
- <var:week>
- <a var:href="appointmentViewURL"
- ><small><var:string value="shortTextForApt"
- const:escapeHTML="NO"
- /></small></a><br />
- </var:week>
- </var:week-overview>
- </var:component>
- </td>
- </tr>
- <tr bgcolor="#F5F5E9">
- <td align="left" width="10"><var:entity const:name="nbsp"/></td>
- <td align="right"><img
- border="0" alt=""
- src="/sogod.woa/so/ControlPanel/Products/CommonUI/Resources/corner_right.gif" /></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#F5F5E9">
- <table border="0" width="100%" cellpadding="10" cellspacing="0">
- <tr />
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
+ </td>
+ </tr>
</table>
- <!--
- <hr />
- <var:string value="thisWeekQueryParameters" />
- -->
- <!--
- <hr/>
-
- Appointments:
- <var:component className="UIxAptTableView" appointments="appointments"/>
- -->
- <!-- pre><var:string value="appointments" const:insertBR="YES"/></pre -->
-
</var:component>
@implementation UIxCalWeekOverview
-- (NSArray *)appointments {
- return [self fetchCoreInfos];
-}
-
- (void)setDayIndex:(char)_idx {
NSCalendarDate *d;
endOfDay];
}
+- (NSArray *)appointments {
+ return [self fetchCoreInfos];
+}
+
/* URLs */
- (NSDictionary *)prevWeekQueryParameters {
# $Id$
-SUBMINOR_VERSION:=80
+SUBMINOR_VERSION:=81
# v0.9.70 requires libNGExtensions v4.3.107
# v0.9.67 requires SOPE 4.3
skycalendar.html,
skycalendar.js,
green_corner.gif,
+ invisible_space_2.gif,
);
factories = {