From ef1be5dc5f6b746162b8cda5d0222a74ebcd7514 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 4 Feb 2014 16:25:52 -0500 Subject: [PATCH] Improve deleting occurences of recurrent events --- NEWS | 2 + SoObjects/SOGo/SOGoGCSFolder.m | 10 +- UI/Common/UIxFolderActions.m | 2 +- UI/Scheduler/Arabic.lproj/Localizable.strings | 5 +- .../Localizable.strings | 5 +- .../Catalan.lproj/Localizable.strings | 5 +- UI/Scheduler/Czech.lproj/Localizable.strings | 5 +- UI/Scheduler/Danish.lproj/Localizable.strings | 5 +- .../English.lproj/Localizable.strings | 5 +- UI/Scheduler/French.lproj/Localizable.strings | 5 +- UI/Scheduler/German.lproj/Localizable.strings | 5 +- .../Hungarian.lproj/Localizable.strings | 5 +- .../Icelandic.lproj/Localizable.strings | 5 +- .../Italian.lproj/Localizable.strings | 5 +- .../Russian.lproj/Localizable.strings | 5 +- UI/Scheduler/Slovak.lproj/Localizable.strings | 8 +- .../Localizable.strings | 5 +- .../SpanishSpain.lproj/Localizable.strings | 5 +- UI/Scheduler/UIxCalMainView.m | 6 + .../Ukrainian.lproj/Localizable.strings | 5 +- UI/Templates/SchedulerUI/UIxCalMainView.wox | 1 + UI/WebServerResources/ContactsUI.js | 2 +- UI/WebServerResources/SchedulerUI.js | 135 +++++++++++------- UI/WebServerResources/generic.css | 19 ++- UI/WebServerResources/generic.js | 4 +- 25 files changed, 173 insertions(+), 91 deletions(-) diff --git a/NEWS b/NEWS index dbc4c6e26..b8a0b1db4 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ Enhancements - warn user when overbooking a resource by creating an event in its calendar (#2541) - converted JavaScript alerts to inline CSS dialogs in appointment editor - visually identify users with no freebusy information in autocompletion widget of attendees editor (#2565) + - respect occurences of recurrent events when deleting selected events (#1950) + - improved confirmation dialog box when deleting events and tasks Bug fixes - don't load 'background' attribute (#2437) diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 668a23fea..135a07dc0 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -788,16 +788,22 @@ static NSArray *childRecordFields = nil; - (void) deleteEntriesWithIds: (NSArray *) ids { unsigned int count, max; - NSString *currentID; + NSEnumerator *names; + NSString *currentID, *currentName; SOGoContentObject *deleteObject; max = [ids count]; for (count = 0; count < max; count++) { currentID = [ids objectAtIndex: count]; - deleteObject = [self lookupName: currentID + names = [[currentID componentsSeparatedByString: @"/"] objectEnumerator]; + deleteObject = self; + while ((currentName = [names nextObject])) + { + deleteObject = [deleteObject lookupName: currentName inContext: context acquire: NO]; + } if (![deleteObject isKindOfClass: [NSException class]]) { if ([deleteObject respondsToSelector: @selector (prepareDelete)]) diff --git a/UI/Common/UIxFolderActions.m b/UI/Common/UIxFolderActions.m index a527699ec..fb0a95eeb 100644 --- a/UI/Common/UIxFolderActions.m +++ b/UI/Common/UIxFolderActions.m @@ -215,7 +215,7 @@ NSArray *ids; idsParam = [[context request] formValueForKey: @"ids"]; - ids = [idsParam componentsSeparatedByString: @"/"]; + ids = [idsParam componentsSeparatedByString: @","]; if ([ids count]) { clientObject = [self clientObject]; diff --git a/UI/Scheduler/Arabic.lproj/Localizable.strings b/UI/Scheduler/Arabic.lproj/Localizable.strings index 6fc599a80..1d4b86057 100644 --- a/UI/Scheduler/Arabic.lproj/Localizable.strings +++ b/UI/Scheduler/Arabic.lproj/Localizable.strings @@ -411,8 +411,9 @@ validate_endbeforestart = "تاريخ الانتهاء الذي أدخلته "Workweek days only" = "ايام العمل الأسبوعية فقط"; "Tasks in View" = "المهمات في العرض"; -"eventDeleteConfirmation" = "الحدث (الأحداث) الآتية ستُمحى: \n%{0}\nهل تريد المتابعة؟"; -"taskDeleteConfirmation" = "المهمة (المهام) التالية ستمحى: \n %{0}\n هل تريد المتابعة؟"; +"eventDeleteConfirmation" = "الحدث (الأحداث) الآتية ستُمحى:"; +"taskDeleteConfirmation" = "المهمة (المهام) التالية ستمحى:"; +"Would you like to continue?" = " هل تريد المتابعة؟"; "You cannot remove nor unsubscribe from your personal calendar." = "لا يمكنك حذف أو إلغاء اشتراكك من تقويمك الشخصي."; diff --git a/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings b/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings index 73e31e23a..a2c92dfe9 100644 --- a/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings +++ b/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings @@ -416,8 +416,9 @@ validate_endbeforestart = "A data que você informou ocorre antes da data ini "Workweek days only" = "Somente semanas úteis"; "Tasks in View" = "Tarefas na vista"; -"eventDeleteConfirmation" = "O(s) seguinte(s) evento(s) será(ão) apagado(s): \n%{0}\nGostaria de continuar?"; -"taskDeleteConfirmation" = "Apagar permanentemente esta tarefa.\nVocê gostaria de continuar?"; +"eventDeleteConfirmation" = "O(s) seguinte(s) evento(s) será(ão) apagado(s):"; +"taskDeleteConfirmation" = "Apagar permanentemente esta tarefa."; +"Would you like to continue?" = "Gostaria de continuar?"; "You cannot remove nor unsubscribe from your personal calendar." = "Você não pode remover nem retirar-se do seu calendário pessoal."; diff --git a/UI/Scheduler/Catalan.lproj/Localizable.strings b/UI/Scheduler/Catalan.lproj/Localizable.strings index 0acc5a3f6..030dd4644 100644 --- a/UI/Scheduler/Catalan.lproj/Localizable.strings +++ b/UI/Scheduler/Catalan.lproj/Localizable.strings @@ -411,8 +411,9 @@ validate_endbeforestart = "La data/hora de començament és posterior a la d' "Workweek days only" = "Només dies laborables"; "Tasks in View" = "Mostrar tasques"; -"eventDeleteConfirmation" = "El següent esdeveniment (s) s'esborrarà: \n%{0}\nVoleu continuar?"; -"taskDeleteConfirmation" = "Aquesta tasca s'esborrarà definitivament. Voleu continuar?"; +"eventDeleteConfirmation" = "El següent esdeveniment (s) s'esborrarà:"; +"taskDeleteConfirmation" = "Aquesta tasca s'esborrarà definitivament."; +"Would you like to continue?" = "Voleu continuar?"; "You cannot remove nor unsubscribe from your personal calendar." = "No podeu cancel·lar la subscripció al calendari personal o esborrar-lo."; diff --git a/UI/Scheduler/Czech.lproj/Localizable.strings b/UI/Scheduler/Czech.lproj/Localizable.strings index d625e8210..4b0688657 100644 --- a/UI/Scheduler/Czech.lproj/Localizable.strings +++ b/UI/Scheduler/Czech.lproj/Localizable.strings @@ -416,8 +416,9 @@ validate_endbeforestart = "Zadané datum konce je před začátkem události. "Workweek days only" = "Pouze pracovní dny"; "Tasks in View" = "Zobrazené úkoly"; -"eventDeleteConfirmation" = "Tato událost(i) bude smazána:\n%{0}\nChcete pokračovat?"; -"taskDeleteConfirmation" = "Smazání tohoto úkolu je permanentní.\nChcete pokračovat?"; +"eventDeleteConfirmation" = "Tato událost(i) bude smazána:"; +"taskDeleteConfirmation" = "Smazání tohoto úkolu je permanentní."; +"Would you like to continue?" = "Chcete pokračovat?"; "You cannot remove nor unsubscribe from your personal calendar." = "Nemůžete odebrat nebo se odhlásit z odebírání svého vlastního kalendáře."; diff --git a/UI/Scheduler/Danish.lproj/Localizable.strings b/UI/Scheduler/Danish.lproj/Localizable.strings index 6a70c7038..f3141ffa5 100644 --- a/UI/Scheduler/Danish.lproj/Localizable.strings +++ b/UI/Scheduler/Danish.lproj/Localizable.strings @@ -411,8 +411,9 @@ validate_endbeforestart = "Indtastet slutdato ligger før startdato."; "Workweek days only" = "Arbejdsuge dage kun"; "Tasks in View" = "Opgaver i visning"; -"eventDeleteConfirmation" = "Følgende begivenhed er/bliver slettet: \n%{0}\nFortsæt?"; -"taskDeleteConfirmation" = "Følgende opgave(r) bliver slettet: \n%{0}\nFortsæt?"; +"eventDeleteConfirmation" = "Følgende begivenhed er/bliver slettet:"; +"taskDeleteConfirmation" = "Følgende opgave(r) bliver slettet:"; +"Would you like to continue?" = "Fortsæt?"; "You cannot remove nor unsubscribe from your personal calendar." = "Du kan ikke fjerne eller afmelde din personlige kalender."; diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index 6378e645e..900fa9614 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -416,8 +416,9 @@ validate_endbeforestart = "The end date that you entered occurs before the st "Workweek days only" = "Workweek days only"; "Tasks in View" = "Tasks in View"; -"eventDeleteConfirmation" = "The following event(s) will be erased: \n%{0}\nWould you like to continue?"; -"taskDeleteConfirmation" = "The following task(s) will be erased: \n%{0}\nWould you like to continue?"; +"eventDeleteConfirmation" = "The following event(s) will be erased:"; +"taskDeleteConfirmation" = "The following task(s) will be erased:"; +"Would you like to continue?" = "Would you like to continue?"; "You cannot remove nor unsubscribe from your personal calendar." = "You cannot remove nor unsubscribe from your personal calendar."; diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index cb81c3d21..4a044df33 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -416,8 +416,9 @@ validate_endbeforestart = "La date de fin est avant la date de début."; "Workweek days only" = "Semaine de travail seulement"; "Tasks in View" = "Afficher les tâches"; -"eventDeleteConfirmation" = "Le ou les événements suivants seront supprimés :\n%{0}\nVoulez-vous continuer?"; -"taskDeleteConfirmation" = "Le ou les tâches suivantes seront supprimées :\n%{0}\nVoulez-vous continuer?"; +"eventDeleteConfirmation" = "Le ou les événements suivants seront supprimés :"; +"taskDeleteConfirmation" = "Le ou les tâches suivantes seront supprimées :"; +"Would you like to continue?" = "Voulez-vous continuer?"; "You cannot remove nor unsubscribe from your personal calendar." = "Vous ne pouvez pas supprimer ni vous désabonner de votre agenda personnel."; diff --git a/UI/Scheduler/German.lproj/Localizable.strings b/UI/Scheduler/German.lproj/Localizable.strings index 06f2c7bea..226ba29f9 100644 --- a/UI/Scheduler/German.lproj/Localizable.strings +++ b/UI/Scheduler/German.lproj/Localizable.strings @@ -416,8 +416,9 @@ validate_endbeforestart = "Ihr Ende ist vor dem Beginndatum."; "Workweek days only" = "nur Arbeitstage"; "Tasks in View" = "Aufgaben anzeigen"; -"eventDeleteConfirmation" = "Diese Termine werden gelöscht: \n%{0}\nFortfahren?"; -"taskDeleteConfirmation" = "Diese Aufgaben werden gelöscht: \n%{0}\nFortfahren?"; +"eventDeleteConfirmation" = "Diese Termine werden gelöscht:"; +"taskDeleteConfirmation" = "Diese Aufgaben werden gelöscht:"; +"Would you like to continue?" = "Fortfahren?"; "You cannot remove nor unsubscribe from your personal calendar." = "Der persönliche Kalender kann weder gelöscht noch abbestellt werden."; diff --git a/UI/Scheduler/Hungarian.lproj/Localizable.strings b/UI/Scheduler/Hungarian.lproj/Localizable.strings index 96965355e..24f2382fb 100644 --- a/UI/Scheduler/Hungarian.lproj/Localizable.strings +++ b/UI/Scheduler/Hungarian.lproj/Localizable.strings @@ -416,8 +416,9 @@ validate_endbeforestart = "A megadott befejező dátum korábbi, mint a kezd "Workweek days only" = "Csak hétköznapok"; "Tasks in View" = "Feladatok megjelenítése"; -"eventDeleteConfirmation" = "Az alábbi esemény(eke)t törli: \n%{0}\nFolytatja?"; -"taskDeleteConfirmation" = "A feladat törlése végleges.\nFolytatja?"; +"eventDeleteConfirmation" = "Az alábbi esemény(eke)t törli:"; +"taskDeleteConfirmation" = "A feladat törlése végleges."; +"Would you like to continue?" = "Folytatja?"; "You cannot remove nor unsubscribe from your personal calendar." = "Nem törölhet, valamint nem iratkozhat le egy személyes naptárról."; diff --git a/UI/Scheduler/Icelandic.lproj/Localizable.strings b/UI/Scheduler/Icelandic.lproj/Localizable.strings index b9c599c28..499ed3c80 100644 --- a/UI/Scheduler/Icelandic.lproj/Localizable.strings +++ b/UI/Scheduler/Icelandic.lproj/Localizable.strings @@ -409,8 +409,9 @@ validate_endbeforestart = "Lokadagurinn sem er tilgreindur, er fyrr en byrjun "Workweek days only" = "Aðeins vinnudagar"; "Tasks in View" = "Sýnd verkefni"; -"eventDeleteConfirmation" = "Eftirfarandi viðburði/viðburðum verður eytt: \n%{0}\nViltu halda áfram?"; -"taskDeleteConfirmation" = "Eftirfarandi verkefni/verkefnum verður eytt: \n%{0}\nViltu halda áfram?"; +"eventDeleteConfirmation" = "Eftirfarandi viðburði/viðburðum verður eytt:"; +"taskDeleteConfirmation" = "Eftirfarandi verkefni/verkefnum verður eytt:"; +"Would you like to continue?" = "Viltu halda áfram?"; "You cannot remove nor unsubscribe from your personal calendar." = "Ekki er hægt að fjarlægja eða segja upp áskrift að sínu eigin persónulega dagatali."; diff --git a/UI/Scheduler/Italian.lproj/Localizable.strings b/UI/Scheduler/Italian.lproj/Localizable.strings index 45bb915a4..3ca6154f9 100644 --- a/UI/Scheduler/Italian.lproj/Localizable.strings +++ b/UI/Scheduler/Italian.lproj/Localizable.strings @@ -410,8 +410,9 @@ validate_endbeforestart = "La data finale specificata è precedente alla data "Workweek days only" = "Solo giorni lavorativi"; "Tasks in View" = "Attività in elenco"; -"eventDeleteConfirmation" = "Il seguente evento(i) sarà cancellato: \n%{0}\nVuoi continuare?"; -"taskDeleteConfirmation" = "Stai per cancellare in maniera permanente il l'attività.\nVuoi procedere?"; +"eventDeleteConfirmation" = "Il seguente evento(i) sarà cancellato:"; +"taskDeleteConfirmation" = "Stai per cancellare in maniera permanente il l'attività."; +"Would you like to continue?" = "Vuoi procedere?"; "You cannot remove nor unsubscribe from your personal calendar." = "Non puoi rimuovere la sottoscrizione del tuo calendario personale."; diff --git a/UI/Scheduler/Russian.lproj/Localizable.strings b/UI/Scheduler/Russian.lproj/Localizable.strings index ac361dd93..992c40d15 100644 --- a/UI/Scheduler/Russian.lproj/Localizable.strings +++ b/UI/Scheduler/Russian.lproj/Localizable.strings @@ -416,8 +416,9 @@ validate_endbeforestart = "Дата начала позже даты конц "Workweek days only" = "Только рабочие дни недели"; "Tasks in View" = "Задания в виде"; -"eventDeleteConfirmation" = "Следующие события будут удалены: \n%{0}\nПродолжить удаление?"; -"taskDeleteConfirmation" = "Событие будет удалено безвозвратно.\nПродолжить?"; +"eventDeleteConfirmation" = "Следующие события будут удалены:"; +"taskDeleteConfirmation" = "Событие будет удалено безвозвратно."; +"Would you like to continue?" = "Продолжить?"; "You cannot remove nor unsubscribe from your personal calendar." = "Вы не можете удалить персональный календарь, равно как и выключить подписку на него."; diff --git a/UI/Scheduler/Slovak.lproj/Localizable.strings b/UI/Scheduler/Slovak.lproj/Localizable.strings index e69e9b461..d88998233 100644 --- a/UI/Scheduler/Slovak.lproj/Localizable.strings +++ b/UI/Scheduler/Slovak.lproj/Localizable.strings @@ -373,6 +373,9 @@ "Show Time as Free" = "Čas zobraziť ako voľný"; +/* email notifications */ +"Send Appointment Notifications" = "Odoslať notifikáciu o stretnutí"; + /* validation errors */ validate_notitle = "Názov nebol nastavený, pokračovať?"; @@ -411,8 +414,9 @@ validate_endbeforestart = "Zadaný dátum konca je pred začiatkom udalosti." "Workweek days only" = "Len pracovné dni"; "Tasks in View" = "Zobrazené úlohy"; -"eventDeleteConfirmation" = "Nasledujúca udalosť(i) bude odstránená:\n%{0}\nChcete pokračovať?"; -"taskDeleteConfirmation" = "Odstránenie nasledujúcej úlohy(oh) je nevratné.\n%{0}\nChcete pokračovať?"; +"eventDeleteConfirmation" = "Nasledujúca udalosť(i) bude odstránená:"; +"taskDeleteConfirmation" = "Odstránenie nasledujúcej úlohy(oh) je nevratné."; +"Would you like to continue?" = "Chcete pokračovať?"; "You cannot remove nor unsubscribe from your personal calendar." = "Nemôžete odstrániť ani sa odhlásiť z odoberania svojho vlastného kalendára."; diff --git a/UI/Scheduler/SpanishArgentina.lproj/Localizable.strings b/UI/Scheduler/SpanishArgentina.lproj/Localizable.strings index 8cd2657c9..ad0080835 100644 --- a/UI/Scheduler/SpanishArgentina.lproj/Localizable.strings +++ b/UI/Scheduler/SpanishArgentina.lproj/Localizable.strings @@ -411,8 +411,9 @@ validate_endbeforestart = "La fecha/hora de inicio es posterior a la de fin." "Workweek days only" = "Sólo días laborales"; "Tasks in View" = "Mostrar tareas"; -"eventDeleteConfirmation" = "Se eliminarán el/los siguiente(s) evento(s) : \n%{0}\n¿Desea proceder?"; -"taskDeleteConfirmation" = "No se puede deshacer el borrado de esta tarea. ¿Desea continuar?"; +"eventDeleteConfirmation" = "Se eliminarán el/los siguiente(s) evento(s) :"; +"taskDeleteConfirmation" = "No se puede deshacer el borrado de esta tarea."; +"Would you like to continue?" = "¿Desea continuar?"; "You cannot remove nor unsubscribe from your personal calendar." = "No puede quitarse ni darse de baja de su calendario personal."; diff --git a/UI/Scheduler/SpanishSpain.lproj/Localizable.strings b/UI/Scheduler/SpanishSpain.lproj/Localizable.strings index a448e2e52..aca45c2cb 100644 --- a/UI/Scheduler/SpanishSpain.lproj/Localizable.strings +++ b/UI/Scheduler/SpanishSpain.lproj/Localizable.strings @@ -416,8 +416,9 @@ validate_endbeforestart = "La fecha/hora de inicio es posterior a la de fin." "Workweek days only" = "Sólo días laborables"; "Tasks in View" = "Mostrar tareas"; -"eventDeleteConfirmation" = "Se eliminarán el/los siguiente(s) evento(s) : \n%{0}\n¿Desea proceder?"; -"taskDeleteConfirmation" = "No se puede deshacer el borrado de esta tarea. ¿Desea continuar?"; +"eventDeleteConfirmation" = "Se eliminarán el/los siguiente(s) evento(s) :"; +"taskDeleteConfirmation" = "No se puede deshacer el borrado de esta tarea."; +"Would you like to continue?" = "¿Desea continuar?"; "You cannot remove nor unsubscribe from your personal calendar." = "No se puede quitar ni darse de baja de su calendario personal."; diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index ea93a63b9..7846b43f8 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -79,6 +79,12 @@ } } +- (NSString *) localeCode +{ + // WARNING : NSLocaleCode is not defined in + return [locale objectForKey: @"NSLocaleCode"]; +} + - (NSArray *) monthMenuItems { static NSMutableArray *monthMenuItems = nil; diff --git a/UI/Scheduler/Ukrainian.lproj/Localizable.strings b/UI/Scheduler/Ukrainian.lproj/Localizable.strings index 9d0074480..8818182b4 100644 --- a/UI/Scheduler/Ukrainian.lproj/Localizable.strings +++ b/UI/Scheduler/Ukrainian.lproj/Localizable.strings @@ -409,8 +409,9 @@ validate_endbeforestart = "Дата закінчення передує да "Workweek days only" = "Лише робочі дні"; "Tasks in View" = "Перегляд завдань"; -"eventDeleteConfirmation" = "Ці події буде вилучено: \n%{0}\nПродовжити?"; -"taskDeleteConfirmation" = "Завдання буде вилучено назавжди.\nПродовжити?"; +"eventDeleteConfirmation" = "Ці події буде вилучено:"; +"taskDeleteConfirmation" = "Завдання буде вилучено назавжди."; +"Would you like to continue?" = "Продовжити?"; "You cannot remove nor unsubscribe from your personal calendar." = "Ви не можете вилучити персональнтй календар,а також відписатись від нього."; diff --git a/UI/Templates/SchedulerUI/UIxCalMainView.wox b/UI/Templates/SchedulerUI/UIxCalMainView.wox index 9cb85f741..e52795e93 100644 --- a/UI/Templates/SchedulerUI/UIxCalMainView.wox +++ b/UI/Templates/SchedulerUI/UIxCalMainView.wox @@ -15,6 +15,7 @@ var firstDayOfWeek = ; var dayStartHour = ; var currentView = ''; + var localeCode = '';