See ChangeLog

Monotone-Parent: b917f2afae3c6e2c7a99f4406fd78c09462e37b1
Monotone-Revision: 6d931b60fff0152bef4accc444201620045a9d87

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-06-15T21:19:36
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2009-06-15 21:19:36 +00:00
parent dd543d934e
commit f1b2286848
5 changed files with 37 additions and 9 deletions

View File

@ -1,3 +1,13 @@
2009-06-15 Francis Lachapelle <flachapelle@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m
([SOGoAppointmentFolder
-_appendCycleException:firstInstanceCalendarDateRange:fromRow:forRange:toArray:]):
for exceptions in the date range, add the boolean key
"isException" to the dictionary.
(-_flattenCycleRecords:fetchRange:): renamed method (was
-fixupCyclicRecords:fetchRange:).
2009-06-12 Francis Lachapelle <flachapelle@inverse.ca>
* UI/Contacts/UIxContactEditor.m ([UIxContactEditor

5
NEWS
View File

@ -1,3 +1,8 @@
1.0-2009xxyy (1.0.3)
--------------------
- improved search behavior of users folders (UIxContactsUserFolders)
- the editor window in the web interface now appears directly when editing an exception occurence of a repeating event (no more dialog window, as in Lightning)
1.0-20090605 (1.0.2)
--------------------
- basic alarm implementation for the web interface

View File

@ -611,7 +611,7 @@ static NSArray *reducedReportQueryFields = nil;
/* cycle is in _r. We also have to override the c_startdate/c_enddate with the date values of
the reccurence since we use those when displaying events in SOGo Web */
tmp = [_r startDate];
tmp = [_r startDate];
[tmp setTimeZone: timeZone];
[md setObject: tmp forKey: @"startDate"];
dateSecs = [NSNumber numberWithInt: [tmp timeIntervalSince1970]];
@ -627,6 +627,8 @@ static NSArray *reducedReportQueryFields = nil;
dateSecs = [NSNumber numberWithInt: [tmp timeIntervalSince1970]];
[md setObject: dateSecs forKey: @"c_recurrence_id"];
// The first instance date is added to the dictionary so it can
// be used by UIxCalListingActions to compute the DST offset.
tmp = [_fir startDate];
[md setObject: tmp forKey: @"cycleStartDate"];
@ -707,11 +709,19 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
{
newRecord = [self fixupRecord: [component quickRecord]];
[newRecord setObject: [NSNumber numberWithInt: 1]
forKey: @"c_iscycle"];
forKey: @"c_iscycle"];
oldRecord = [ma objectAtIndex: recordIndex];
[newRecord setObject: [oldRecord objectForKey: @"c_recurrence_id"]
forKey: @"c_recurrence_id"];
forKey: @"c_recurrence_id"];
// The first instance date is added to the dictionary so it can
// be used by UIxCalListingActions to compute the DST offset.
[newRecord setObject: [fir startDate] forKey: @"cycleStartDate"];
// We identified the record as an exception.
[newRecord setObject: [NSNumber numberWithInt: 1]
forKey: @"isException"];
[ma replaceObjectAtIndex: recordIndex withObject: newRecord];
}
else
@ -831,8 +841,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
[_ma addObjectsFromArray: recordArray];
}
- (NSArray *) fixupCyclicRecords: (NSArray *) _records
fetchRange: (NGCalendarDateRange *) _r
- (NSArray *) _flattenCycleRecords: (NSArray *) _records
fetchRange: (NGCalendarDateRange *) _r
{
// TODO: is the result supposed to be sorted by date?
NSMutableArray *ma;
@ -1009,7 +1019,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
if (records)
{
if (r)
records = [self fixupCyclicRecords: records fetchRange: r];
records = [self _flattenCycleRecords: records fetchRange: r];
if (ma)
[ma addObjectsFromArray: records];
else

View File

@ -78,7 +78,7 @@ static NSArray *tasksFields = nil;
@"c_enddate", @"c_location", @"c_isallday",
@"c_classification", @"c_partmails",
@"c_partstates", @"c_owner", @"c_iscycle", @"c_nextalarm",
@"c_recurrence_id", nil];
@"c_recurrence_id", @"isException", nil];
[eventsFields retain];
}
if (!tasksFields)

View File

@ -93,7 +93,7 @@ function editEvent() {
_editEventId(nodes[i].cname,
nodes[i].calendar);
} else if (selectedCalendarCell) {
if (selectedCalendarCell[0].recurrenceTime)
if (selectedCalendarCell[0].recurrenceTime && !selectedCalendarCell[0].isException)
_editRecurrenceDialog(selectedCalendarCell[0], "confirmEditing");
else
_editEventId(selectedCalendarCell[0].cname,
@ -406,7 +406,7 @@ function onViewEventCallback(http) {
}
function editDoubleClickedEvent(event) {
if (this.recurrenceTime)
if (this.recurrenceTime && !this.isException)
_editRecurrenceDialog(this, "confirmEditing");
else
_editEventId(this.cname, this.calendar);
@ -586,6 +586,7 @@ function eventsListCallback(http) {
row.calendar = escape(data[i][1]);
if (rTime)
row.recurrenceTime = escape(rTime);
row.isException = data[i][15];
var startDate = new Date();
startDate.setTime(data[i][4] * 1000);
row.day = startDate.getDayString();
@ -988,12 +989,14 @@ function newBaseEventDIV(eventRep, event, eventText) {
// log ("12 iscycle = " + event[12]);
// log ("13 nextalarm = " + event[13]);
// log ("14 recurrenceid = " + event[14]);
// log ("15 isexception = " + event[15]);
var eventDiv = $(document.createElement("div"));
eventDiv.cname = event[0];
eventDiv.calendar = event[1];
if (eventRep.recurrenceTime)
eventDiv.recurrenceTime = eventRep.recurrenceTime;
eventDiv.isException = event[15];
eventDiv.addClassName("event");
if (event[13] > 0)
eventDiv.addClassName("alarm");