merge of '717a205cd03639045199ba0d192c6a7fba0ec751'

and 'a2229b5d48e906a42ce1d5dfc54dd55fbbbb0367'

Monotone-Parent: 717a205cd03639045199ba0d192c6a7fba0ec751
Monotone-Parent: a2229b5d48e906a42ce1d5dfc54dd55fbbbb0367
Monotone-Revision: d350e00bfd2567a3222879e516694b309523070e

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-07-15T15:19:50
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert 2009-07-15 15:19:50 +00:00
commit d6755b5087
4 changed files with 56 additions and 32 deletions

View file

@ -1,3 +1,8 @@
2009-07-14 Cyril Robert <crobert@inverse.ca>
* UI/Scheduler/UIxComponentEditor.m: Added a default title for
vevents and vtodos
2009-07-14 Francis Lachapelle <flachapelle@inverse.ca>
* UI/SOGoUI/UIxComponent.m ([UIxComponent -buildDate]): moved

View file

@ -218,12 +218,12 @@
startDate = [self newStartDate];
duration = [self queryParameterForKey:@"dur"];
if ([duration length] > 0)
minutes = [duration intValue];
minutes = [duration intValue];
else
minutes = 60;
minutes = 60;
endDate
= [startDate dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: minutes seconds: 0];
= [startDate dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: minutes seconds: 0];
}
else
{
@ -234,28 +234,28 @@
startDate = [event startDate];
daylightOffset = 0;
if ([co isNew] && [co isKindOfClass: [SOGoAppointmentOccurence class]])
{
// We are creating a new exception in a recurrent event -- compute the daylight
// saving time with respect to the first occurrence of the recurrent event.
master = (iCalEvent*)[[event parent] firstChildWithTag: @"vevent"];
firstDate = [master startDate];
timeZone = [[context activeUser] timeZone];
if ([timeZone isDaylightSavingTimeForDate: startDate] != [timeZone isDaylightSavingTimeForDate: firstDate])
{
daylightOffset = (signed int)[timeZone secondsFromGMTForDate: firstDate]
- (signed int)[timeZone secondsFromGMTForDate: startDate];
startDate = [startDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
}
}
{
// We are creating a new exception in a recurrent event -- compute the daylight
// saving time with respect to the first occurrence of the recurrent event.
master = (iCalEvent*)[[event parent] firstChildWithTag: @"vevent"];
firstDate = [master startDate];
timeZone = [[context activeUser] timeZone];
if ([timeZone isDaylightSavingTimeForDate: startDate] != [timeZone isDaylightSavingTimeForDate: firstDate])
{
daylightOffset = (signed int)[timeZone secondsFromGMTForDate: firstDate]
- (signed int)[timeZone secondsFromGMTForDate: startDate];
startDate = [startDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
}
}
isAllDay = [event isAllDay];
if (isAllDay)
endDate = [[event endDate] dateByAddingYears: 0 months: 0 days: -1];
endDate = [[event endDate] dateByAddingYears: 0 months: 0 days: -1];
else
endDate = [[event endDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
endDate = [[event endDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
isTransparent = ![event isOpaque];
}
@ -278,17 +278,17 @@
{
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: co
inContext: context])
{
method = [NSString stringWithFormat:@"%@/%@.ics/editAsAppointment",
[co soURL], objectId];
}
onObject: co
inContext: context])
{
method = [NSString stringWithFormat:@"%@/%@.ics/editAsAppointment",
[co soURL], objectId];
}
else
{
method = [NSString stringWithFormat: @"%@/Calendar/personal/%@.vcf/editAsAppointment",
[self userFolderPath], objectId];
}
{
method = [NSString stringWithFormat: @"%@/Calendar/personal/%@.vcf/editAsAppointment",
[self userFolderPath], objectId];
}
uri = [self completeHrefForMethod: method];
result = [self redirectToLocation: uri];
}

View file

@ -614,6 +614,19 @@ iRANGE(2);
- (NSString *) title
{
SOGoObject <SOGoComponentOccurence> *co;
NSString *tag;
co = [self clientObject];
if ([co isNew] && [co isKindOfClass: [SOGoCalendarComponent class]])
{
tag = [co componentTag];
if ([tag isEqualToString: @"vevent"])
[self setTitle: [self labelForKey: @"New Event"]];
else if ([tag isEqualToString: @"vtodo"])
[self setTitle: [self labelForKey: @"New Task"]];
}
return title;
}

View file

@ -135,11 +135,17 @@ function onComponentEditorLoad(event) {
$("repeatList").observe("change", onPopupRecurrenceWindow);
$("reminderHref").observe("click", onPopupReminderWindow);
$("reminderList").observe("change", onPopupReminderWindow);
$("summary").observe("keyup", onSummaryChange);
Event.observe(window, "resize", onWindowResize);
onPopupRecurrenceWindow(null);
onPopupReminderWindow(null);
onSummaryChange (null);
}
function onSummaryChange (e) {
document.title = $("summary").value;
}
function onWindowResize(event) {