From 1fee7a96f65dc3fb02041d7333ee06ade451c19a Mon Sep 17 00:00:00 2001 From: "michael.buettner%sun.com" Date: Tue, 21 Aug 2007 13:52:07 +0000 Subject: [PATCH] Bug 385896 - Reminder '1 week before' doesn't work, r=philipp git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@232452 18797224-902f-48f8-a5cc-f745e15eee43 --- .../prototypes/wcap/sun-calendar-event-dialog.js | 12 ++++++++---- .../prototypes/wcap/sun-calendar-event-dialog.xul | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mozilla/calendar/prototypes/wcap/sun-calendar-event-dialog.js b/mozilla/calendar/prototypes/wcap/sun-calendar-event-dialog.js index fea66c601f0..83b881ae3a2 100644 --- a/mozilla/calendar/prototypes/wcap/sun-calendar-event-dialog.js +++ b/mozilla/calendar/prototypes/wcap/sun-calendar-event-dialog.js @@ -871,16 +871,20 @@ function loadReminder(item) { menuitem.getAttribute("relation") == relation) { var unit = menuitem.getAttribute("unit"); var length = menuitem.getAttribute("length"); - if (unit == "minutes" && - item.alarmOffset.minutes == length) { + if (unit == "days" && + item.alarmOffset.weeks * 7 == length) { + matchingItem = menuitem; + break; + } else if (unit == "days" && + item.alarmOffset.days == length) { matchingItem = menuitem; break; } else if (unit == "hours" && item.alarmOffset.hours == length) { matchingItem = menuitem; break; - } else if (unit == "days" && - item.alarmOffset.days == length) { + } else if (unit == "minutes" && + item.alarmOffset.minutes == length) { matchingItem = menuitem; break; } diff --git a/mozilla/calendar/prototypes/wcap/sun-calendar-event-dialog.xul b/mozilla/calendar/prototypes/wcap/sun-calendar-event-dialog.xul index 600cf2cfd23..e0da2b8274b 100644 --- a/mozilla/calendar/prototypes/wcap/sun-calendar-event-dialog.xul +++ b/mozilla/calendar/prototypes/wcap/sun-calendar-event-dialog.xul @@ -767,7 +767,7 @@ relation="START" unit="days"/>