phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Week view suggestion


From: Ralf Becker
Subject: Re: [Phpgroupware-developers] Week view suggestion
Date: Wed, 02 Jul 2003 13:47:24 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.3) Gecko/20030312

Sam Liddicott schrieb:
Note how all the times line up horizontally at take a look at http://www.ananova.com/tv_listings/_tv_full_listings.html

It's nice, like our planner but arranged vertical not horizontaly. Of course with a different resolution as the planner always shows at least one month. Dayview is useing a similar algorithm.

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.

Your welcome to do so.
I would not promisse to much, without looking at the code first, the calendar is a bit of a beast ;-)

The file is calendar/inc/class.uicalendar.inc.php the function is called week(). Please use the .16 branch and NOT .14!

Ralf
--
----------------------------------------------------------------------
Ralf Becker
OUTDOOR UNLIMITED Training GmbH                Telefon 0631 / 31657-0
Leibnizstraße 17                               Telefax 0631 / 31657-26
D-67663 Kaiserslautern            EMail address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]