mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-27 09:02:43 +00:00
Added addToCalendar method to add calendar from an email invitation
Monotone-Parent: 154f2a301f669b275706368200446169ee67b579 Monotone-Revision: cea719aec080dc3ba804233ec84e32d27a1d338a Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-06-30T19:20:10 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
13
ChangeLog
13
ChangeLog
@@ -1,3 +1,16 @@
|
||||
2009-06-30 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartICalActions.m
|
||||
([UIxMailPartICalActions -addToCalendarAction]): new method to add
|
||||
a calendar from an invitation (used to work?!).
|
||||
|
||||
* SoObjects/SOGo/NSString+Utilities.m ([NSString
|
||||
-_handleURLs:textToMatch:prefix:inRanges:]): fixed offset
|
||||
of range after replacement.
|
||||
|
||||
* SoObjects/SOGo/NSArray+Utilities.m ([NSArray
|
||||
-hasRangeIntersection:]): fixed error in range comparison.
|
||||
|
||||
2009-06-30 Cyril Robert <crobert@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/MailerUI.js: Added drag & drop support!
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
- (WOResponse *) acceptAction;
|
||||
- (WOResponse *) declineAction;
|
||||
- (WOResponse *) addToCalendarAction;
|
||||
- (WOResponse *) deleteFromCalendarAction;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -378,6 +378,38 @@
|
||||
return [self _changePartStatusAction: @"DECLINED"];
|
||||
}
|
||||
|
||||
- (WOResponse *) addToCalendarAction
|
||||
{
|
||||
iCalEvent *emailEvent;
|
||||
SOGoAppointmentObject *eventObject;
|
||||
NSString *iCalString;
|
||||
WOResponse *response;
|
||||
|
||||
emailEvent = [self _emailEvent];
|
||||
if (emailEvent)
|
||||
{
|
||||
eventObject = [self _eventObjectWithUID: [emailEvent uid]];
|
||||
if ([eventObject isNew])
|
||||
{
|
||||
iCalString = [[emailEvent parent] versitString];
|
||||
[eventObject saveContentString: iCalString];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
{
|
||||
response = [self responseWithStatus: 409];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
response = [context response];
|
||||
[response setStatus: 409];
|
||||
response = [self responseWithStatus: 404];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) deleteFromCalendarAction
|
||||
{
|
||||
iCalEvent *emailEvent;
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailPartICalAction";
|
||||
actionName = "markTentative";
|
||||
};
|
||||
}; */
|
||||
addToCalendar = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailPartICalAction";
|
||||
actionClass = "UIxMailPartICalActions";
|
||||
actionName = "addToCalendar";
|
||||
}; */
|
||||
};
|
||||
deleteFromCalendar = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailPartICalActions";
|
||||
|
||||
Reference in New Issue
Block a user