From 75365c7e5f436e9015fc81f7ae54bef946744f03 Mon Sep 17 00:00:00 2001 From: C Robert Date: Tue, 22 Sep 2009 20:54:09 +0000 Subject: [PATCH] Fixed day start > day end issue Monotone-Parent: 0c9dd83dd8ccf4f99590b84d0154f2fdc166550f Monotone-Revision: 083c5eacbea5cf39b26ae89e1fa54412357634af Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-22T20:54:09 Monotone-Branch: ca.inverse.sogo --- .../Localizable.strings | 1 + .../Czech.lproj/Localizable.strings | 1 + .../Dutch.lproj/Localizable.strings | 1 + .../English.lproj/Localizable.strings | 1 + .../French.lproj/Localizable.strings | 1 + .../German.lproj/Localizable.strings | 1 + .../Hungarian.lproj/Localizable.strings | 1 + .../Italian.lproj/Localizable.strings | 1 + .../Russian.lproj/Localizable.strings | 1 + .../Spanish.lproj/Localizable.strings | 1 + .../Welsh.lproj/Localizable.strings | 1 + UI/WebServerResources/UIxPreferences.js | 18 ++++++++++++++++-- 12 files changed, 27 insertions(+), 2 deletions(-) diff --git a/UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings b/UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings index 1158875a8..6e17d7db3 100644 --- a/UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings +++ b/UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings @@ -49,6 +49,7 @@ "Week begins on :" = "A Semana começa em :"; "Day start time :" = "O Dia começa as :"; "Day end time :" = "O Dia termina as :"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "Primeira semana do ano :"; "Enable reminders for Calendar items" = "Habilitar lembretes para os itens do Calendário"; "Play a sound when a reminder comes due" diff --git a/UI/PreferencesUI/Czech.lproj/Localizable.strings b/UI/PreferencesUI/Czech.lproj/Localizable.strings index 0f24ae757..b368c7773 100644 --- a/UI/PreferencesUI/Czech.lproj/Localizable.strings +++ b/UI/PreferencesUI/Czech.lproj/Localizable.strings @@ -49,6 +49,7 @@ "Week begins on :" = "Týden začíná v :"; "Day start time :" = "Začátek dne :"; "Day end time :" = "Konec dne :"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "První týden roku :"; "Enable reminders for Calendar items" = "Povolit upomínky pro položky v kalendáři"; "Play a sound when a reminder comes due" diff --git a/UI/PreferencesUI/Dutch.lproj/Localizable.strings b/UI/PreferencesUI/Dutch.lproj/Localizable.strings index 18b3bed94..daadd4f61 100644 --- a/UI/PreferencesUI/Dutch.lproj/Localizable.strings +++ b/UI/PreferencesUI/Dutch.lproj/Localizable.strings @@ -47,6 +47,7 @@ "Week begins on :" = "Week begint op:"; "Day start time :" = "Dag begint om:"; "Day end time :" = "Dag eindigt om:"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "Eerste week van het jaar:"; "Enable reminders for Calendar items" = "Herinneringen inschakelen voor afspraken"; "Play a sound when a reminder comes due" = "Geluidafspelen bij herinnering"; diff --git a/UI/PreferencesUI/English.lproj/Localizable.strings b/UI/PreferencesUI/English.lproj/Localizable.strings index f9bb5a4ba..4eb78b818 100644 --- a/UI/PreferencesUI/English.lproj/Localizable.strings +++ b/UI/PreferencesUI/English.lproj/Localizable.strings @@ -49,6 +49,7 @@ "Week begins on :" = "Week begins on :"; "Day start time :" = "Day start time :"; "Day end time :" = "Day end time :"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "First week of year :"; "Enable reminders for Calendar items" = "Enable reminders for Calendar items"; "Play a sound when a reminder comes due" diff --git a/UI/PreferencesUI/French.lproj/Localizable.strings b/UI/PreferencesUI/French.lproj/Localizable.strings index 18764abd7..5822d01bf 100644 --- a/UI/PreferencesUI/French.lproj/Localizable.strings +++ b/UI/PreferencesUI/French.lproj/Localizable.strings @@ -47,6 +47,7 @@ "Week begins on :" = "Premier jour de la semaine :"; "Day start time :" = "Début de la journée :"; "Day end time :" = "Fin de la journée :"; +"Day start time must be prior to day end time." = "Le début de la journée doit être avant la fin de la journée."; "First week of year :" = "Première semaine de l'année :"; "Enable reminders for Calendar items" = "Activer les rappels pour les éléments du calendrier"; "Play a sound when a reminder comes due" = "Émettre un signal sonore à l'échéance du rappel"; diff --git a/UI/PreferencesUI/German.lproj/Localizable.strings b/UI/PreferencesUI/German.lproj/Localizable.strings index 69432e4da..e0ce4a5b0 100644 --- a/UI/PreferencesUI/German.lproj/Localizable.strings +++ b/UI/PreferencesUI/German.lproj/Localizable.strings @@ -47,6 +47,7 @@ "Week begins on :" = "Erster Wochentag:"; "Day start time :" = "Tagesanfang:"; "Day end time :" = "Tagesende:"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "Erste Woche des Jahres:"; "Enable reminders for Calendar items" = "Terminerinnerung aktivieren"; "Play a sound when a reminder comes due" = "Akustisches Signal zur Terminerinnerung"; diff --git a/UI/PreferencesUI/Hungarian.lproj/Localizable.strings b/UI/PreferencesUI/Hungarian.lproj/Localizable.strings index e8ae55f77..997564630 100644 --- a/UI/PreferencesUI/Hungarian.lproj/Localizable.strings +++ b/UI/PreferencesUI/Hungarian.lproj/Localizable.strings @@ -49,6 +49,7 @@ "Week begins on :" = "Hét kezdőnapja:"; "Day start time :" = "Nap kezdete:"; "Day end time :" = "Nap vége:"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "Év első hete:"; "Enable reminders for Calendar items" = "Emlékeztető engedélyezése a naptárbejegyzésekhez"; "Play a sound when a reminder comes due" diff --git a/UI/PreferencesUI/Italian.lproj/Localizable.strings b/UI/PreferencesUI/Italian.lproj/Localizable.strings index 0320f355e..4cc33394e 100644 --- a/UI/PreferencesUI/Italian.lproj/Localizable.strings +++ b/UI/PreferencesUI/Italian.lproj/Localizable.strings @@ -49,6 +49,7 @@ "Week begins on :" = "La settimana inizia il:"; "Day start time :" = "La giornata lavorativa inizia alle ore:"; "Day end time :" = "La giornata lavorativa termina alle ore:"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "Prima settimana dell'anno:"; "Enable reminders for Calendar items" = "Abilita promemoria per gli eventi del Calendario"; "Play a sound when a reminder comes due" diff --git a/UI/PreferencesUI/Russian.lproj/Localizable.strings b/UI/PreferencesUI/Russian.lproj/Localizable.strings index d76058711..509d914be 100644 --- a/UI/PreferencesUI/Russian.lproj/Localizable.strings +++ b/UI/PreferencesUI/Russian.lproj/Localizable.strings @@ -54,6 +54,7 @@ "Week begins on :" = "Неделя начинается с :"; "Day start time :" = "Рабочий день начинается в :"; "Day end time :" = "Рабочий день заканчивается в :"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "Первая неделя года :"; "Enable reminders for Calendar items" = "Включить напоминания для событий календаря"; "Play a sound when a reminder comes due" diff --git a/UI/PreferencesUI/Spanish.lproj/Localizable.strings b/UI/PreferencesUI/Spanish.lproj/Localizable.strings index d05198d90..92e31c6d7 100644 --- a/UI/PreferencesUI/Spanish.lproj/Localizable.strings +++ b/UI/PreferencesUI/Spanish.lproj/Localizable.strings @@ -58,6 +58,7 @@ "Week begins on :" = "Semana empieza con: "; "Day start time :" = "Hora inicio: "; "Day end time :" = "Hora fin: "; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "Primera semana del año: "; "Enable reminders for Calendar items" = "Habilitar recordatorios para elementos del calendario"; "Play a sound when a reminder comes due" diff --git a/UI/PreferencesUI/Welsh.lproj/Localizable.strings b/UI/PreferencesUI/Welsh.lproj/Localizable.strings index c4063a80f..2d56e0dcc 100644 --- a/UI/PreferencesUI/Welsh.lproj/Localizable.strings +++ b/UI/PreferencesUI/Welsh.lproj/Localizable.strings @@ -49,6 +49,7 @@ "Week begins on :" = "wythnos yn dechrau :"; "Day start time :" = "Amser dechrau'r diwrnod :"; "Day end time :" = "Amser diwedd y dydd :"; +"Day start time must be prior to day end time." = "Day start time must be prior to day end time."; "First week of year :" = "Wythnos cyntaf y flwyddyn :"; "Enable reminders for Calendar items" = "Galluogu atgoffa ar gyfer eitemau calendr"; "Play a sound when a reminder comes due" diff --git a/UI/WebServerResources/UIxPreferences.js b/UI/WebServerResources/UIxPreferences.js index 296df42a5..418679989 100644 --- a/UI/WebServerResources/UIxPreferences.js +++ b/UI/WebServerResources/UIxPreferences.js @@ -1,15 +1,29 @@ /* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ function savePreferences(sender) { + var sendForm = true; + var sigList = $("signaturePlacementList"); if (sigList) - sigList.disabled=false; + sigList.disabled = false; if ($("categoriesList")) { serializeCategories(null); } - $("mainForm").submit(); + if ($("dayStartTime")) { + var start = $("dayStartTime"); + var selectedStart = parseInt(start.options[start.selectedIndex].value); + var end = $("dayEndTime"); + var selectedEnd = parseInt(end.options[end.selectedIndex].value); + if (selectedStart >= selectedEnd) { + alert (getLabel ("Day start time must be prior to day end time.")); + sendForm = false; + } + } + + if (sendForm) + $("mainForm").submit(); return false; }