mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 22:38:51 +00:00
merge of '94da50397e51ef2f1bf7530b7a3c4b2e9e1594f6'
and 'd350e00bfd2567a3222879e516694b309523070e' Monotone-Parent: 94da50397e51ef2f1bf7530b7a3c4b2e9e1594f6 Monotone-Parent: d350e00bfd2567a3222879e516694b309523070e Monotone-Revision: 3b129c3c362bac1e7fdf67d93f24a6e9be27fdc1 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-16T13:20:52 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
@@ -615,6 +615,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user