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 @@ - - + +