|
From: | Sam Liddicott |
Subject: | [Phpgroupware-developers] Week view suggestion |
Date: | Tue, 1 Jul 2003 10:11:53 +0100 |
Note how all the times line up horizontally at
take a look at http://www.ananova.com/tv_listings/_tv_full_listings.html
I wrote the code behind it and think phpGroupware
could benefit from the same algorithm in week view and day view calendar
modes.
The simple rule is maintain a list for each day
(and one for the timeline) sorted by time.
Then merge them into one array sorted by time
(allowing for duplicate times of course).
Then iterate over this single list for each time
value present.
For each column (day or timeline) that doesn't stop
or start an item, add one to the rowcount for that cell for when it does
close.
For each column where an item close, autostart a
blank cell.
For each column where an item opens, close the
previous cell with it's accumulated rowcount.
Cells with 0 rowcount aren't rendered.
For simultneous appointments in the same day, that
day will have to be represented by multiple colums, but I don't support
that.
I'm busy but can code this for you if you tell me
which file and which line starts to render the calendar.
Sam
|
[Prev in Thread] | Current Thread | [Next in Thread] |