Closed Bug 349960 Opened 14 years ago Closed 13 years ago

All day events should be at top on month view event lists

Categories

(Calendar :: Calendar Views, defect)

defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: vcssupport1, Unassigned)

Details

(Whiteboard: [cal-ui-review+])

Attachments

(2 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b2) Gecko/20060823 BonEcho/2.0b2
Build Identifier: Thunderbird 2.0a1 (Build 2006082303), Lightning 0.1+ (Build 2006082307)

Currently, in the Lightning Month view, All day events are listed after standard events for each day.  All day events should be listed first, especially where they are public holidays etc.

Reproducible: Always

Steps to Reproduce:
1. Create an event for a day with a start and end time e.g.  Event A 9.00 - 17.00
2. Create an all day event for the same day e.g. Event B All day
3. View the Monthly view containing that day

Actual Results:  
Events are listed:
09.00 Event A
Event B

Expected Results:  
Events are listed:
Event B
09.00 Event A
Confirmed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060828 Calendar/0.3a2+

Since sorting by time is done for all "normal" events it seems logical that all day events are on top of the list.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [cal-ui-review+]
This patch sorts the All-Day events after the tasks an before the events with start times.
Multiday events go behind the All-day events.
Attachment #254176 - Flags: ui-review?(mvl)
Comment on attachment 254176 [details] [diff] [review]
sorts All-day events before other events

ui-review=mvl
Attachment #254176 - Flags: ui-review?(mvl) → ui-review+
Attachment #254176 - Attachment is obsolete: true
Attachment #254459 - Flags: ui-review+
Attachment #254459 - Flags: first-review?(jminta)
Comment on attachment 254459 [details] [diff] [review]
I had some tabs in there which were replaced with spaces...

Patch was attached twice.
Attachment #254459 - Attachment is obsolete: true
Attachment #254459 - Flags: ui-review+
Attachment #254459 - Flags: first-review?(jminta)
Comment on attachment 254458 [details] [diff] [review]
I had some tabs in there which were replaced with spaces...

+                if (a.item.startDate.isDate && !b.item.startDate.isDate) return -1;
+                if (!a.item.startDate.isDate && b.item.startDate.isDate) return 1;

Just as an FYI, this is the only place in calendar/ where you can get away with placing a return on the same line as an if block.  Patch looks great. r1/r2=jminta
Attachment #254458 - Flags: second-review+
Attachment #254458 - Flags: first-review?(jminta)
Attachment #254458 - Flags: first-review+
Markus, thanks for your work here!  I've landed the patch.
  calendar/base/content/calendar-month-view.xml: 1.66 -> 1.67
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070216 Calendar/0.4a1
(In reply to comment #10)
> Verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre)
> Gecko/20070216 Calendar/0.4a1
> 
--> VERIFIED
Status: RESOLVED → VERIFIED
Whiteboard: [cal-ui-review+] → [cal-ui-review+][litmus testcase wanted]
Litmus testcase 3008 created
Whiteboard: [cal-ui-review+][litmus testcase wanted] → [cal-ui-review+]
You need to log in before you can comment on or make changes to this bug.