Closed Bug 472300 Opened 16 years ago Closed 16 years ago

Consolidation of the Multiday-view and month-view

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: berend.cornelius09, Assigned: berend.cornelius09)

Details

Attachments

(1 file, 1 obsolete file)

The following parts of these two bindings (base/content/calendar-multiday-view.xml#calendar-multiday-view and base/content/calendar-month-view.xml#calendar-month-view) can be consolidated:
The operationListener, the calIObserver, calICompositeObserver, and calIAlarmServiceObserver and the method "popRefreshQueue".
Attached patch patch v. #1 (obsolete) β€” β€” Splinter Review
The patch attached consolidates the mentioned code into base/content/calendar-base-view.xml#calendar-base-view. I aligned the code concerning the insertion of tasks without entrydate or duedate:
The rule, not to insert tasks tasks without entrydate or duedate was missing in the calendar-month-view. I discussed this over with Philipp beforehand.
Assignee: nobody → Berend.Cornelius
Status: NEW → ASSIGNED
Attachment #355571 - Flags: review?(philipp)
Attached patch patch v. #2 β€” β€” Splinter Review
I forgot to replace the "vars" by "lets"...
Attachment #355571 - Attachment is obsolete: true
Attachment #355753 - Flags: review?(philipp)
Attachment #355571 - Flags: review?(philipp)
Attachment #355753 - Flags: review?(philipp) → review+
Comment on attachment 355753 [details] [diff] [review]
patch v. #2

>+              function hasGoodDates(item) {
>+                  if (isToDo(item) && (!item.entryDate || !item.dueDate)) {
>+                      return false;
>+                  }
>+                  return true;
>+              }
>+              aItems = aItems.filter(hasGoodDates);
Don't modify the argument, I'd go with:
let items = aItems.filter(function(x) !isToDo(x) || (x.entryDate && x.dueDate));

>+
>+            QueryInterface: function QueryInterface(aIID) {
>+                if (!aIID.equals(Components.interfaces.calIObserver) &&
>+                    !aIID.equals(Components.interfaces.calIAlarmServiceObserver) &&
>+                    !aIID.equals(Components.interfaces.calICompositeObserver) &&
>+                    !aIID.equals(Components.interfaces.nsISupports)) {
>+                    throw Components.results.NS_ERROR_NO_INTERFACE;
Use cal.doQueryInterface()


>+                //dump ("occs: " + occs.length + "\n");
Remove comment

>+            },
>+            onModifyItem: function onModifyItem(aNewItem, aOldItem) {
blank line between functions


>+          if (!this.startDate || !this.endDate)
>+            return;
>+

>+
>+          if (!this.mCalendar)
>+              return;

>+                if (isToDo(aNewItem) && isToDo(aOldItem) &&
>+                    !this.calView.mTasksInView)
>+                    return;

>+          if(this.mTasksInView)
>+            filter |= this.mCalendar.ITEM_FILTER_TYPE_ALL;
>+          else
>+            filter |= this.mCalendar.ITEM_FILTER_TYPE_EVENT;


4x Missing brackets

r=philipp
addressed the commments of philipp and pushed to commm-central:

http://hg.mozilla.org/comm-central/rev/6e86173f8691

-> fixed
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Checked (with litmus multiweek/month test cases and some additional ad-hoc testing) in lightning/sunbird build 20090113 -> VERIFIED
Status: RESOLVED → VERIFIED
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: