mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-12 10:21:22 +00:00
Monotone-Parent: 5a3c5e24f7615c54657e9e9cb706861e6724ac1c
Monotone-Revision: d58df6a64cf33b6764ccd9bb13f96b8e13354749 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-11-15T00:07:08 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2006-11-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxCalInlineAptView.m: same as the first below...
|
||||
|
||||
* UI/Scheduler/UIxCalDayTable.m: enhanced to provide the new
|
||||
DIV-based presentation of the days and weeks.
|
||||
|
||||
* SoObjects/Appointments/SOGoTaskObject.m: same as below...
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentObject.m: lookupName:...
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
id style;
|
||||
id queryDictionary;
|
||||
id referenceDate;
|
||||
int dayStartHour;
|
||||
int dayEndHour;
|
||||
BOOL canAccess;
|
||||
}
|
||||
|
||||
@@ -45,7 +47,20 @@
|
||||
|
||||
@implementation UIxCalInlineAptView
|
||||
|
||||
- (void)dealloc {
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
dayStartHour = 0;
|
||||
dayEndHour = 24;
|
||||
appointment = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[appointment release];
|
||||
[formatter release];
|
||||
[tooltipFormatter release];
|
||||
@@ -56,35 +71,58 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setAppointment: (NSDictionary *)_appointment {
|
||||
- (void) setAppointment: (NSDictionary *) _appointment
|
||||
{
|
||||
ASSIGN(appointment, _appointment);
|
||||
}
|
||||
- (NSDictionary *)appointment {
|
||||
|
||||
- (NSDictionary *) appointment
|
||||
{
|
||||
return appointment;
|
||||
}
|
||||
|
||||
- (void)setFormatter:(id)_formatter {
|
||||
- (void) setDayStartHour: (unsigned int) anHour
|
||||
{
|
||||
dayStartHour = anHour;
|
||||
}
|
||||
|
||||
- (void) setDayEndHour: (unsigned int) anHour
|
||||
{
|
||||
dayEndHour = anHour;
|
||||
}
|
||||
|
||||
- (void) setFormatter: (id) _formatter
|
||||
{
|
||||
ASSIGN(formatter, _formatter);
|
||||
}
|
||||
- (id)formatter {
|
||||
|
||||
- (id) formatter
|
||||
{
|
||||
return formatter;
|
||||
}
|
||||
|
||||
- (void)setTooltipFormatter:(id)_tooltipFormatter {
|
||||
- (void) setTooltipFormatter: (id) _tooltipFormatter
|
||||
{
|
||||
ASSIGN(tooltipFormatter, _tooltipFormatter);
|
||||
}
|
||||
- (id)tooltipFormatter {
|
||||
|
||||
- (id) tooltipFormatter
|
||||
{
|
||||
return tooltipFormatter;
|
||||
}
|
||||
|
||||
- (void)setUrl:(id)_url {
|
||||
- (void) setUrl: (id) _url
|
||||
{
|
||||
ASSIGN(url, _url);
|
||||
}
|
||||
- (id)url {
|
||||
|
||||
- (id) url
|
||||
{
|
||||
return url;
|
||||
}
|
||||
|
||||
- (void)setStyle:(id)_style {
|
||||
- (void) setStyle: (id) _style
|
||||
{
|
||||
NSMutableString *ms;
|
||||
NSNumber *prio;
|
||||
NSString *s;
|
||||
@@ -117,34 +155,66 @@
|
||||
}
|
||||
ASSIGNCOPY(style, ms);
|
||||
}
|
||||
|
||||
- (id)style {
|
||||
return style;
|
||||
}
|
||||
|
||||
- (void)setQueryDictionary:(id)_queryDictionary {
|
||||
- (void) setQueryDictionary: (id) _queryDictionary
|
||||
{
|
||||
ASSIGN(queryDictionary, _queryDictionary);
|
||||
}
|
||||
- (id)queryDictionary {
|
||||
|
||||
- (id) queryDictionary
|
||||
{
|
||||
return queryDictionary;
|
||||
}
|
||||
|
||||
- (void)setReferenceDate:(id)_referenceDate {
|
||||
- (void) setReferenceDate: (id) _referenceDate
|
||||
{
|
||||
ASSIGN(referenceDate, _referenceDate);
|
||||
}
|
||||
- (id)referenceDate {
|
||||
|
||||
- (id) referenceDate
|
||||
{
|
||||
return referenceDate;
|
||||
}
|
||||
|
||||
- (void)setCanAccess:(BOOL)_canAccess {
|
||||
- (void) setCanAccess: (BOOL) _canAccess
|
||||
{
|
||||
canAccess = _canAccess;
|
||||
}
|
||||
- (BOOL)canAccess {
|
||||
|
||||
- (BOOL) canAccess
|
||||
{
|
||||
return canAccess;
|
||||
}
|
||||
|
||||
- (NSString *) displayClasses
|
||||
{
|
||||
return [NSString stringWithFormat: @"appointmentView ownerIs%@",
|
||||
NSTimeInterval secondsStart, secondsEnd, delta;
|
||||
NSCalendarDate *startDate;
|
||||
int deltaStart, deltaLength;
|
||||
|
||||
startDate = [appointment objectForKey: @"startDate"];
|
||||
secondsStart = [startDate timeIntervalSince1970];
|
||||
secondsEnd = [[appointment objectForKey: @"endDate"] timeIntervalSince1970];
|
||||
delta = (secondsEnd - [startDate timeIntervalSince1970]) / 60;
|
||||
deltaLength = delta / 15;
|
||||
if (((int) delta % 15) > 0)
|
||||
deltaLength += 1;
|
||||
|
||||
deltaStart = (([startDate hourOfDay] * 60 + [startDate minuteOfHour]
|
||||
- dayStartHour * 60) / 15);
|
||||
|
||||
return [NSString stringWithFormat: @"appointment ownerIs%@ starts%d lasts%d",
|
||||
[appointment objectForKey: @"owner"],
|
||||
deltaStart, deltaLength, [startDate dayOfWeek]];
|
||||
}
|
||||
|
||||
- (NSString *) innerDisplayClasses
|
||||
{
|
||||
return [NSString stringWithFormat: @"appointmentInside ownerIs%@",
|
||||
[appointment objectForKey: @"owner"]];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,13 @@
|
||||
<?xml version='1.0' standalone='yes'?>
|
||||
<container
|
||||
<div
|
||||
var:class="displayClasses"
|
||||
var:aptCName="appointment.c_name"
|
||||
var:owner="appointment.owner"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:var="http://www.skyrix.com/od/binding"
|
||||
xmlns:const="http://www.skyrix.com/od/constant"
|
||||
xmlns:rsrc="OGo:url">
|
||||
<var:if condition="canAccess">
|
||||
<a href="#"
|
||||
onclick="onCalendarSelectAppointment(event, this);"
|
||||
var:owner="appointment.owner"
|
||||
ondblclick="displayAppointment(event, this);"
|
||||
var:aptCName="appointment.c_name"
|
||||
var:title="tooltip"
|
||||
var:queryDictionary="queryDictionary">
|
||||
<div var:class="displayClasses">
|
||||
<var:if condition="appointment.isRecurrentEvent">
|
||||
<!-- TODO: maxime needs to provide an image instead! -->
|
||||
<var:string const:value="[R]" style="style" />
|
||||
</var:if>
|
||||
<var:if condition="appointment.ispublic" const:negate="YES">
|
||||
<img rsrc:src="apt_icon_private.gif" />
|
||||
</var:if>
|
||||
<var:string value="title" const:escapeHTML="NO" style="style" />
|
||||
</div>
|
||||
</a>
|
||||
</var:if>
|
||||
<var:if condition="canAccess" const:negate="YES">
|
||||
<span var:class="displayClasses">
|
||||
<img rsrc:src="apt_icon_private.gif" />
|
||||
<var:string value="title" const:escapeHTML="NO" style="style" />
|
||||
</span>
|
||||
</var:if>
|
||||
</container>
|
||||
<div var:class="innerDisplayClasses">
|
||||
<var:string value="appointment.title" const:escapeHTML="NO" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user