From 1d967ed81a20c8127aa3c5d9e38de1895b386a11 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 15 Aug 2006 20:59:06 +0000 Subject: [PATCH] Monotone-Parent: b7c2f1510523ac9f6c6c204d241454a121c4354b Monotone-Revision: b441c0001903d77ff0e1db53edea14d17b313a9e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-08-15T20:59:06 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 +++++ UI/Scheduler/French.lproj/Localizable.strings | 2 +- UI/Scheduler/UIxAppointmentEditor.m | 32 +++---------------- 3 files changed, 13 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 606903427..f98cb4463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-08-15 Wolfgang Sourdeau + + * UI/Scheduler/UIxAppointmentEditor.m: invoke + "stringByEscapingHTMLString" on the resulting value to avoid + issues with accented characters. + ([-jsCode]): removed method since the javascript code was merged + into SchedulerUI.js. + 2006-08-14 Wolfgang Sourdeau * UI/Scheduler/iCalPerson+UIx.m ([iCalPerson +personWithUid:]): diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index f66401805..1adcbd466 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -209,7 +209,7 @@ /* Appointment categories */ "APPOINTMENT" = "Rendez-vous"; -"NOT IN OFFICE" = "A l'exterieur"; +"NOT IN OFFICE" = "A l'extérieur"; "MEETING" = "Réunion"; "HOLIDAY" = "Vacances"; "PHONE CALL" = "Rendez-vous téléphonique"; diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 80aec0da1..514612d11 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -19,7 +19,7 @@ 02111-1307, USA. */ -#include +#import /* TODO: CLEAN UP */ @@ -277,13 +277,14 @@ return categoryItems; } -- (NSString *)itemCategoryText { - return [self labelForKey: self->item]; +- (NSString *) itemCategoryText { + return [[self labelForKey: self->item] stringByEscapingHTMLString]; } - (void)setCategories:(NSArray *)_categories { ASSIGN(self->categories, _categories); } + - (NSArray *)categories { return self->categories; } @@ -917,31 +918,6 @@ /* response generation */ -- (NSString *)jsCode { - static NSString *script = \ - @"function showElement(e, show) {\n" - @" e.style.visibility = show ? 'visible' : 'hidden';\n" - @"}\n" - @"\n" - @"function selectHasCycle(sender) {\n" - @" var value = sender.selectedIndex;\n" - @" var show = (value != 0);\n" - @" var sel = document.getElementById('cycle_end_mode_selection');" - @" this.showElement(document.getElementById('cycle_end_label'), show);\n" - @" this.showElement(document.getElementById('cycle_end_mode'), show);\n" - @" this.selectCycleEnd(sel);\n" - @"}\n" - @"function selectCycleEnd(sender) {\n" - @" var cycleEndUntil = document.getElementById('cycle_end_until');\n" - @" var value = sender.options[sender.selectedIndex].value;\n" - @" var show = (value == 'cycle_end_until');\n" - @" this.showElement(cycleEndUntil, show);\n" - @"}\n" - @"\n"; - - return script; -} - - (NSString *)initialCycleVisibility { if (![self hasCycle]) return @"visibility: hidden;";