See Changelog.

Monotone-Parent: f13b039579047763006c2956ddf349f1bff203a3
Monotone-Revision: f6c7d4502b60b66206223a822d4911218f4bbacf

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2010-08-26T14:14:10
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2010-08-26 14:14:10 +00:00
parent d2b696fcfa
commit c512f1240f
49 changed files with 507 additions and 139 deletions
@@ -554,6 +554,8 @@ vtodo_class2 = "(Tarefa Confidencial)";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Důvěrný úkol)";
"tagHasChanged" = "Změníte-li štítek svého kalendáře, budete muset znovu načíst data do svého mobilního zařízení.\nPokračovat?";
"tagWasAdded" = "Chcete-li synchronizovat tento kalendář, budete muset znovu načíst data do svého mobilního zařízení.\nPokračovat?";
"tagWasRemoved" = "Odstraníte-li u tohoto kalendáře synchronizaci, budete muset znovu načíst data do svého mobilního zařízení.\nPokračovat?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Otevřít úkol...";
"Mark Completed" = "Označit jako dokončené";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Vertrouwelijke taak)";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Taak openen...";
"Mark Completed" = "Mark Completed";
@@ -555,6 +555,8 @@ vtodo_class2 = "(Confidential task)";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
@@ -555,6 +555,8 @@ vtodo_class2 = "(Tâche confidentielle)";
"tagHasChanged" = "En changeant le label de ce calendrier, vous devrez recharger les données sur votre appareil mobile.\nVoulez-vous continuer?";
"tagWasAdded" = "Afin de synchroniser ce calendrier, vous devrez recharger les données sur votre appareil mobile.\nVoulez-vous continuer?";
"tagWasRemoved" = "Afin de ne plus synchroniser ce calendrier, vous devrez recharger les données sur votre appareil mobile.\nVoulez-vous continuer?";
"DestinationCalendarError" = "Le calendrier de destination est le même que celui de l'événement. Choisissez un calendrier de destination différent.";
"EventCopyError" = "La copie a échouée. Choisissez un calendrier de destination différent.";
"Open Task..." = "Ouvrir la tâche...";
"Mark Completed" = "Marquer comme accomplie";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Vertrauliche Aufgabe)";
"tagHasChanged" = "Wenn der Tag des Kalenders geändert wird, müssen die Daten erneut auf das Mobilgerät geladen werden.\nFortfahren?";
"tagWasAdded" = "Wenn der Kalender synchronisiert werden soll, müssen die Daten erneut auf das Mobilgerät geladen werden.\nFortfahren?";
"tagWasRemoved" = "Wenn der Kalender aus der Synchronisation entfernt wird, müssen die Daten erneut auf das Mobilgerät geladen werden.\nFortfahren?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Aufgabe öffnen...";
"Mark Completed" = "Als abgeschlossen markieren";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Bizalmas feladat)";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Attività confidenziale)";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
@@ -555,6 +555,8 @@ vtodo_class2 = "(Zadanie poufne)";
"tagHasChanged" = "Jeśli zmienisz znacznik kalendarza, musisz przeładować dane na swoim urządzeniu mobilnym.\nKontynuować?";
"tagWasAdded" = "Jeśli chesz synchronizować ten kalendarz, będziesz musiał(a) przeładować dane na swoim urządzeniu mobilnym.\nKontynuować?";
"tagWasRemoved" = "Jeśli usuniesz ten kalendarz z synchronizacji, będziesz musiał(a) przeładować dane na swoim urządzeniu mobilnym.\nKontynuować?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Otwórz zadanie...";
"Mark Completed" = "Oznacz jako ukończone";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Confidential task)";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Tarea confidencial)";
"tagHasChanged" = "If you change your calendar's tag, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to reload the data on your mobile device.\nContinue?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Konfidentiell uppgift)";
"tagHasChanged" = "Om du ändrar etiketten på din kalender, behöver du ladda om datat i din mobiltelefon.\nFortsätta?";
"tagWasAdded" = "Om du vill synkronisera kalendern, behöver du ladda om datat i din mobiltelefon.\nFortsätta?";
"tagWasRemoved" = "Om du tar bort kalendern från synkronisering, behöver du ladda om datat i din mobiltelefon.\nFortsätta?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Öppna uppgift...";
"Mark Completed" = "Märk utförd";
+82
View File
@@ -24,9 +24,12 @@
#import <Foundation/NSString.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/SoPermissions.h>
#import <NGObjWeb/SoSecurityManager.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WORequest.h>
#import <NGCards/iCalCalendar.h>
#import <NGCards/iCalEvent.h>
#import <SOGo/NSCalendarDate+SOGo.h>
@@ -108,4 +111,83 @@
return response;
}
- (WOResponse *) copyAction
{
NSString *destination;
NSArray *events;
iCalCalendar *calendar;
iCalRepeatableEntityObject *masterOccurence;
SOGoAppointmentObject *thisEvent;
SOGoAppointmentFolder *sourceCalendar, *destinationCalendar;
SoSecurityManager *sm;
WOResponse *response;
WORequest *rq;
rq = [context request];
destination = [rq formValueForKey: @"destination"];
if (![destination length])
destination = @"personal";
thisEvent = [self clientObject];
sourceCalendar = [thisEvent container];
destinationCalendar = [[sourceCalendar container] lookupName: destination
inContext: context
acquire: NO];
if (destinationCalendar)
{
// Verify access rights to destination calendar
sm = [SoSecurityManager sharedSecurityManager];
if ([sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: destinationCalendar
inContext: context])
{
response = [NSException exceptionWithHTTPStatus: 403
reason: @"Can't add event to destination calendar."];
}
// Verify that the destination calendar is not the source calendar
else if ([[destinationCalendar nameInContainer] isEqualToString: [sourceCalendar nameInContainer]])
{
response = [NSException exceptionWithHTTPStatus: 400
reason: @"Destination calendar is the source calendar."];
}
else
{
// Remove attendees, recurrence exceptions and single occurences from the event
calendar = [thisEvent calendar: NO secure: NO];
events = [calendar events];
masterOccurence = [events objectAtIndex: 0];
if ([masterOccurence hasAlarms])
[masterOccurence removeAllAlarms];
if ([masterOccurence hasRecurrenceRules])
{
[masterOccurence removeAllExceptionRules];
[masterOccurence removeAllExceptionDates];
}
if ([[masterOccurence attendees] count] > 0)
{
[masterOccurence setOrganizer: nil];
[masterOccurence removeAllAttendees];
}
[calendar setUniqueChild: masterOccurence];
// Perform the copy
if ([thisEvent copyComponent: calendar
toFolder: (SOGoGCSFolder *) destinationCalendar])
response = [NSException exceptionWithHTTPStatus: 500
reason: @"Can't copy event to destination calendar."];
else
response = [self responseWith204];
}
}
else
{
response = [NSException exceptionWithHTTPStatus: 404
reason: @"Can't find destination calendar."];
}
return response;
}
@end
@@ -540,6 +540,8 @@ vtodo_class2 = "(Конфіденційне завдання)";
"tagHasChanged" = "Якщо Ви змінете теґ вашого календаря, то потрібно буде перевантажити дані на Вашому мобільному пристрої.\nПродовжити?";
"tagWasAdded" = "Якшр Ви хочете синхронізувати цей календар, то потрібно буде перевантажити дані на Вашому мобільному пристрої.\nПродовжити?";
"tagWasRemoved" = "Якщо Ви скасуєте режим синхронізації для цього календаря, то потрібно буде перевантажити дані на Вашому мобільному пристрої.\nПродовжити?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Відкрити завдання...";
"Mark Completed" = "Позначити виконаним";
@@ -554,6 +554,8 @@ vtodo_class2 = "(Tasg gyhoeddus)";
"tagHasChanged" = "If you change your calendar's tag, you'll need to perform a slow sync on your mobile device.\nContinue?";
"tagWasAdded" = "If you want to synchronize this calendar, you'll need to reload the data on your mobile device.\nContinue?";
"tagWasRemoved" = "If you remove this calendar from synchronization, you'll need to perform a slow sync on your mobile device.\nContinue?";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Open Task..." = "Open Task...";
"Mark Completed" = "Mark Completed";
+5
View File
@@ -220,6 +220,11 @@
pageName = "UIxAppointmentEditor";
actionName = "save";
};
copy = {
protectedBy = "ViewAllComponent";
actionClass = "UIxAppointmentActions";
actionName = "copy";
};
accept = {
protectedBy = "RespondToComponent";
pageName = "UIxAppointmentEditor";