From 0bb57fc1ddb41cddd166264267ec47815f1869c5 Mon Sep 17 00:00:00 2001 From: "jminta%gmail.com" Date: Tue, 27 Sep 2005 00:57:02 +0000 Subject: [PATCH] Bug 293201 Activate the agenda filter r=dmose --- calendar/base/src/calTodo.js | 18 +++++++++ .../lightning/content/agenda-tree-overlay.xul | 10 ++--- calendar/lightning/content/agenda-tree.js | 37 ++++++++++++++----- 3 files changed, 51 insertions(+), 14 deletions(-) diff --git a/calendar/base/src/calTodo.js b/calendar/base/src/calTodo.js index 256edb82900e..b9c011cd7e4b 100644 --- a/calendar/base/src/calTodo.js +++ b/calendar/base/src/calTodo.js @@ -231,6 +231,24 @@ calTodo.prototype = { isPropertyPromoted: function (name) { return (this.todoPromotedProps[name]); }, + + getOccurrencesBetween: function(aStartDate, aEndDate, aCount) { + if (this.recurrenceInfo) { + return this.recurrenceInfo.getOccurrences(aStartDate, aEndDate, 0, aCount); + } + if (!this.entryDate && !this.dueDate) + return null; + + if ((this.entryDate && this.entryDate.compare(aStartDate) >= 0 && this.entryDate.compare(aEndDate) <= 0) || + (this.dueDate && this.dueDate.compare(aStartDate) >= 0 && this.dueDate.compare(aEndDate) <= 0)) + { + aCount.value = 1; + return ([ this ]); + } + + aCount.value = 0; + return null; + } }; // var decl to prevent spurious error messages when loaded as component diff --git a/calendar/lightning/content/agenda-tree-overlay.xul b/calendar/lightning/content/agenda-tree-overlay.xul index 2be666361e3c..dcfcf09dc968 100644 --- a/calendar/lightning/content/agenda-tree-overlay.xul +++ b/calendar/lightning/content/agenda-tree-overlay.xul @@ -10,11 +10,11 @@