From: Chad <ch...@ch...> - 2002-11-22 19:38:47
|
From the spec I have gathered this: Priority 1-4 = High Priority 5 = Medium Priority 6-9 = Low Priority 0 or no Priority = No Priority. It would seem that Low Priority is more important than No Priority and should sort No priority to the very bottom. This is what I was working towards implementing before I was sidetracked by a nasty bug, hehe. I have since stopped working on that bug and have turned all my findings over to David, who will look into it a bit this weekend if he has time (thanks!). so i imagine the array would look something like: $master_array['-2']['priority']['due_date'] right now it looks like this: $master_array['-2']['priority']['uid'] I haven't gotten it that far yet, not sure when you last checked cvs, as there is basic sorting of events. I cheat a bit and give no priority events a "10" and completed events and "11" for sanity sorting sake. I also havent figured out what to do if there is no due date, for sorting sake I was just putting it one year after the start date. What would be nice to have (if you want to work on it) is a todo.php for the java popup. Since the information is different the popup should contain more information such as submitted time, due date, priority, and other things found in the spec not supported in iCal. Just my thoughts. -C On Friday, November 22, 2002, at 10:42 AM, Greg Westin wrote: > I just started thinking about sorting the todos, so that high priority > todos show up at the top (and maybe those with pressing due dates), but > am not sure how best to go about it. > > I figure that they should be sorted first by priority, but I tend to > think > that low priority items should go below those without any priority (is > this sort of thing discussed in the iCalendar standard somewhere? > Could > someone point me in the right direction?). I think just a basic sort > would put those without values last. I would then tend to sort things > by > due date within any given priority level. Does that seem reasonable? > > Also, I'm not sure about how this sort of sorting would be best > accomplished, technically. A sort() or ksort() wouldn't work, because > the > sort happens many levels above the level of the things being compared. > A > comment on php.net suggested that usort() would be the best thing for > this > purpose. Looking at the usort() documentation, it actually looks like > it > should be fairly easy to write a function that does this sort of > nontrivial comparison. > > I just wanted to see if anyone had any thoughts on this before I just > went > ahead with it. > > Greg > > --- > gr...@gr... > http://www.gregwestin.com/ > Contact info: http://www.gregwestin.com/contact.php > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpicalendar-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel |