From 130eb506db0cdbd26bdb1da5659e7c91c6fbce44 Mon Sep 17 00:00:00 2001 From: "mikep%oeone.com" Date: Wed, 3 Apr 2002 18:09:08 +0000 Subject: [PATCH] Fixing bug 135170, problem with repeating events when editing them. git-svn-id: svn://10.0.0.236/trunk@118013 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/calendar/resources/content/calendarEventDialog.js | 8 +++++--- .../calendar/resources/content/calendarEventDialog.xul | 4 ++-- mozilla/calendar/resources/content/eventDialog.js | 8 +++++--- mozilla/calendar/resources/content/eventDialog.xul | 4 ++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/mozilla/calendar/resources/content/calendarEventDialog.js b/mozilla/calendar/resources/content/calendarEventDialog.js index 387ae01bbbd..0a6a5619f1c 100644 --- a/mozilla/calendar/resources/content/calendarEventDialog.js +++ b/mozilla/calendar/resources/content/calendarEventDialog.js @@ -188,7 +188,11 @@ function loadCalendarEventDialog() setFieldValue( "repeat-checkbox", gEvent.recur, "checked"); setFieldValue( "repeat-length-field", gEvent.recurInterval ); - setFieldValue( "repeat-length-units", gEvent.recurUnits ); //don't put the extra "value" element here, or it won't work. + if( gEvent.recurUnits ) + setFieldValue( "repeat-length-units", gEvent.recurUnits ); //don't put the extra "value" element here, or it won't work. + else + setFieldValue( "repeat-length-units", "weeks" ); + setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "selected" ); setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "selected" ); @@ -321,8 +325,6 @@ function onOKCommand() } } - - // :TODO: REALLY only do this if the alarm or start settings change.? //if the end time is later than the start time... alert the user using text from the dtd. diff --git a/mozilla/calendar/resources/content/calendarEventDialog.xul b/mozilla/calendar/resources/content/calendarEventDialog.xul index 39ffdbf3f98..47e588d7980 100644 --- a/mozilla/calendar/resources/content/calendarEventDialog.xul +++ b/mozilla/calendar/resources/content/calendarEventDialog.xul @@ -247,8 +247,8 @@ - - + + diff --git a/mozilla/calendar/resources/content/eventDialog.js b/mozilla/calendar/resources/content/eventDialog.js index 387ae01bbbd..0a6a5619f1c 100644 --- a/mozilla/calendar/resources/content/eventDialog.js +++ b/mozilla/calendar/resources/content/eventDialog.js @@ -188,7 +188,11 @@ function loadCalendarEventDialog() setFieldValue( "repeat-checkbox", gEvent.recur, "checked"); setFieldValue( "repeat-length-field", gEvent.recurInterval ); - setFieldValue( "repeat-length-units", gEvent.recurUnits ); //don't put the extra "value" element here, or it won't work. + if( gEvent.recurUnits ) + setFieldValue( "repeat-length-units", gEvent.recurUnits ); //don't put the extra "value" element here, or it won't work. + else + setFieldValue( "repeat-length-units", "weeks" ); + setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "selected" ); setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "selected" ); @@ -321,8 +325,6 @@ function onOKCommand() } } - - // :TODO: REALLY only do this if the alarm or start settings change.? //if the end time is later than the start time... alert the user using text from the dtd. diff --git a/mozilla/calendar/resources/content/eventDialog.xul b/mozilla/calendar/resources/content/eventDialog.xul index 39ffdbf3f98..47e588d7980 100644 --- a/mozilla/calendar/resources/content/eventDialog.xul +++ b/mozilla/calendar/resources/content/eventDialog.xul @@ -247,8 +247,8 @@ - - + +