From e101ba0d421c2e5e81c8483d40b646f3db582f0e Mon Sep 17 00:00:00 2001 From: "pavlov%pavlov.net" Date: Tue, 24 May 2005 22:19:24 +0000 Subject: [PATCH] event dialog cleanups getting ready for recurrence --- .../base/content/calendar-event-dialog.js | 23 +++++++++++++++++-- .../base/content/calendar-event-dialog.xul | 13 ++++++----- .../base/content/calendar-item-editing.js | 4 ++-- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/calendar/base/content/calendar-event-dialog.js b/calendar/base/content/calendar-event-dialog.js index cbd95ec6962..71b96bd14c1 100644 --- a/calendar/base/content/calendar-event-dialog.js +++ b/calendar/base/content/calendar-event-dialog.js @@ -55,11 +55,15 @@ function onLoad() loadDialog(); - // update alarm checkbox/label/settings button - updateAlarm(); // update datetime pickers updateAllDay(); + // update recurrence button + updateRecurrence(); + + // update alarm checkbox/label/settings button + updateAlarm(); + document.getElementById("event-title").focus(); opener.setCursor("auto"); @@ -115,6 +119,10 @@ function loadDialog() } } + if (event.recurrenceInfo) { + setElementValue("event-recurrence", "true", "checked"); + } + if (event.hasAlarm) { var alarmLength = event.getProperty("alarmLength"); if (alarmLength != null) { @@ -186,6 +194,17 @@ function updateAllDay() setElementValue("event-endtime", allDay, "timepickerdisabled"); } + +function updateRecurrence() +{ + var recur = getElementValue("event-recurrence", "checked"); + if (recur) { + setElementValue("set-recurrence", false, "disabled"); + } else { + setElementValue("set-recurrence", "true", "disabled"); + } +} + var prevAlarmItem = null; function setAlarmFields(alarmItem) { diff --git a/calendar/base/content/calendar-event-dialog.xul b/calendar/base/content/calendar-event-dialog.xul index 6d94afc5b03..cc4d3847afb 100644 --- a/calendar/base/content/calendar-event-dialog.xul +++ b/calendar/base/content/calendar-event-dialog.xul @@ -104,12 +104,13 @@