Fix until date in event recurrence editor

- fixed date picker
- fixed JavaScript error caused by French translation
- fixed until date definition when timezone of active user was different
  from the system timezone
- fixes #2173, fixes #2175
This commit is contained in:
Francis Lachapelle
2013-01-11 09:46:58 -05:00
parent c7fbcb0fc4
commit 0e0b7728fd
5 changed files with 23 additions and 12 deletions
@@ -511,7 +511,7 @@ vtodo_class2 = "(Tâche confidentielle)";
"monthDayFieldInvalid" = "Veuillez spécifier un chiffre supérieur ou égal à 1 dans la journée du mois.";
"yearFieldInvalid" = "Veuillez spécifier un chiffre supérieur ou égal à 1 dans le champ Année(s).";
"appointmentFieldInvalid" = "Veuillez spécifier un chiffre supérieur ou égal à 1 dans le champ rendez-vous.";
"recurrenceUnsupported" = "Ce type de récurrence n\'est pas supporté.";
"recurrenceUnsupported" = "Ce type de récurrence n\\\'est pas supporté.";
"Please specify a calendar name." = "Veuillez définir un nom au calendrier.";
"tagNotDefined" = "Vous devez spécifier un label si vous désirez synchroniser ce calendrier.";
"tagAlreadyExists" = "Le label spécifié est déjà associé à un autre calendrier. Choisissez-en un autre.";
+10
View File
@@ -1917,10 +1917,20 @@ RANGE(2);
else if (range == 2)
{
NSCalendarDate *date;
SOGoUserDefaults *ud;
date = [NSCalendarDate dateWithString: [self range2]
calendarFormat: dateFormat
locale: locale];
// Adjust timezone
ud = [[context activeUser] userDefaults];
date = [NSCalendarDate dateWithYear: [date yearOfCommonEra]
month: [date monthOfYear]
day: [date dayOfYear]
hour: 0 minute: 0 second: 0
timeZone: [ud timeZone]];
[theRule setUntilDate: date];
}
// No end date.
@@ -10,7 +10,8 @@
className="UIxPageFrame"
const:toolbar="none"
const:popup="YES"
const:jsFiles="skycalendar.js">
const:cssFiles="datepicker.css"
const:jsFiles="datepicker.js">
<script type="text/javascript">
var dayFieldInvalid = '<var:string label:value="dayFieldInvalid"/>';
@@ -20,7 +20,7 @@ DIV#windowButtons
DIV#pageContent
{ padding: 1em; }
TABLE TH
TABLE.frame TH
{ font-weight: normal;
text-align: right;
width: 5em; }
+9 -9
View File
@@ -383,21 +383,21 @@ function onEditorCancelClick(event) {
}
function escapeAlertMessages () {
dayFieldInvalid = dayFieldInvalid.decodeEntities ();
weekFieldInvalid = weekFieldInvalid.decodeEntities ();
monthFieldInvalid = monthFieldInvalid.decodeEntities ();
monthDayFieldInvalid = monthDayFieldInvalid.decodeEntities ();
yearFieldInvalid = yearFieldInvalid.decodeEntities ();
appointmentFieldInvalid = appointmentFieldInvalid.decodeEntities ();
recurrenceUnsupported = recurrenceUnsupported.decodeEntities ();
dayFieldInvalid = dayFieldInvalid.decodeEntities();
weekFieldInvalid = weekFieldInvalid.decodeEntities();
monthFieldInvalid = monthFieldInvalid.decodeEntities();
monthDayFieldInvalid = monthDayFieldInvalid.decodeEntities();
yearFieldInvalid = yearFieldInvalid.decodeEntities();
appointmentFieldInvalid = appointmentFieldInvalid.decodeEntities();
recurrenceUnsupported = recurrenceUnsupported.decodeEntities();
}
function onRecurrenceLoadHandler() {
initializeFormValues();
initializeSelectors();
initializeWindowButtons();
assignCalendar('endDate_date');
escapeAlertMessages ();
jQuery('#endDate_date').closest('.date').datepicker({autoclose: true});
escapeAlertMessages();
}
document.observe("dom:loaded", onRecurrenceLoadHandler);