User:Jminta: Difference between revisions

Jump to navigation Jump to search
1,579 bytes removed ,  10 March 2006
(Calendar itemSelectionManager)
Line 1: Line 1:
== Calendar itemSelectionManager==
== Calendar carpool lane ==
I want to re-do the way Sunbird/Calendar handle selected events/tasks/calendarsThis will hopefully make it easier to solve [https://bugzilla.mozilla.org/show_bug.cgi?id=195582 Bug 195580] (can't delete task/calendar with delete button) and [https://bugzilla.mozilla.org/show_bug.cgi?id=195582 Bug 195582] (can't edit a task/calender with edit button.)
Nobody likes code freezes, but they're a necessary part of a release cycleThe current freeze, in order to release, Lightning 0.1, is blocking a growing list of patches from landing. This is a scratchpad of bugs that have reviewed patches that should land as soon as possible after the final release.


Basically, I want to create a new Sunbird/Calendar component called itemSelectionManager.  First and foremost, this will be independent of gCalendarManager, which should make switch to the new views in 0.3a2 easier.  The way I'm currently envisioning this, it will tighly integrate the task list with the normal calendar views.  That is, selecting a task in the task list will highlight the corresponding item-box in the calendarView (if 'Tasks in View') is selected.  Similarly, selecting an item-box representing a task in the calendar view will selected that item in the task list.
Bugs are sorted in a vague sort of priority order, based on time submitted/reviewed, size, # of other bugs being blocked, etc.


The downside of this is that selecting a task in the task list clears the event selection in the view. Still, I prefer this to maintaining separate lists of selected events and trying to make the edit/delete buttons follow the focus. That has a better chance of confusing the user.
# [https://bugzilla.mozilla.org/show_bug.cgi?id=325068 Bug 325068]
 
# [https://bugzilla.mozilla.org/show_bug.cgi?id=321608 Bug 321608]
=== General Outline of Methods ===
# [https://bugzilla.mozilla.org/show_bug.cgi?id=321560 Bug 321560]
'''addObserver(observer)''' - Adds an observer that should be notified of item selection changes and changes in item focus. Observers should implement 'onItemSelectionChange' and 'onItemFocusChange'.
# [https://bugzilla.mozilla.org/show_bug.cgi?id=325519 Bug 325519]
 
# [https://bugzilla.mozilla.org/show_bug.cgi?id=327662 Bug 327662]
'''removeObserver(observer)''' - Removes an observer.
# [https://bugzilla.mozilla.org/show_bug.cgi?id=329415 Bug 329415]
 
# [https://bugzilla.mozilla.org/show_bug.cgi?id=329360 Bug 329360]
'''select(itemOrArray, doNotOverwrite)''' - This method passes in either a single item, or an array of items to be selected. If doNotOverwrite (optional parameter) is set and is 'true', the item/array will be appended to the current list of selected items.  Otherwise, it will overwrite that list.
 
'''clearSelection()''' - clears all selected events/tasks. Calling this and select(item, false) is redundant.
 
'''setItemFocus(itemsAreFocused)''' - This should be called with 'false' when another part of the calendar (ie the calendar-listbox) gains focus. It should be called with 'true' when either the calendar view or tasklist is clicked. Probably also when the new/edit event dialog box finishes. It will call the 'onItemFocusChange' method in all observers. The observers can then (if necessary) make changes to the appearance of the items they deal with.
 
'''getItemFocus()''' - Returns true if items are focused or false if they are blurred.
289

edits

Navigation menu