From 8e38c8e9d9ac080050bd3e457c452a47c683d3aa Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 5 Sep 2006 15:08:32 +0000 Subject: [PATCH] Monotone-Parent: f9a470e5408fdd3a912a57d24892418ef5630bf4 Monotone-Revision: 91b936a7c3b51400c8170802ad0c722be8b8553b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-09-05T15:08:32 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ UI/WebServerResources/UIxAppointmentEditor.js | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75e9e759d..d7687eb9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-05 Wolfgang Sourdeau + * UI/WebServerResources/UIxAppointmentEditor.js: convert the + form's time values to integers before comparing them. + * UI/Scheduler/UIxCalAptListView.m ([UIxCalAptListView -currentStartTime]) ([UIxCalAptListView -currentEndTime]): initialize the resulting dates timezone with [self viewTimeZone]. diff --git a/UI/WebServerResources/UIxAppointmentEditor.js b/UI/WebServerResources/UIxAppointmentEditor.js index a4266c7e7..323f0e7b9 100644 --- a/UI/WebServerResources/UIxAppointmentEditor.js +++ b/UI/WebServerResources/UIxAppointmentEditor.js @@ -79,18 +79,17 @@ function validateAptEditor() { // TODO: check time var start, end; - start = document.forms[0]['startTime_time_hour'].value; - end = document.forms[0]['endTime_time_hour'].value; + start = parseInt(document.forms[0]['startTime_time_hour'].value); + end = parseInt(document.forms[0]['endTime_time_hour'].value); + if (start > end) { - window.alert("coucou1"); alert(labels.validate_endbeforestart); return false; } else if (start == end) { - start = document.forms[0]['startTime_time_minute'].value; - end = document.forms[0]['endTime_time_minute'].value; + start = parseInt(document.forms[0]['startTime_time_minute'].value); + end = parseInt(document.forms[0]['endTime_time_minute'].value); if (start > end) { - window.alert("coucou2"); alert(labels.validate_endbeforestart); return false; }