Events
From Project Auriga
Event-driven controls.
Contents |
[edit] Classes:
- Select views
- Update database
- Update views
[edit] Client side:
- Start timer
- Stop timer
- Start task
- Switch task
- Open note
- Save note
- Cancel note
- Park timer
- Pause timer
- Close task
- Add tasktime
- Confirm before date
- Adjust time
[edit] Auriga Events
function auriga_event(module, action, user, item, data=null);
Auriga events are logged to the database with an event id. A client then requests all events since a particular event id, and sends dojo events based on these.
- module: stem of event, base tab that might subscribe to this event
- action: type of change
- user: who might care about this event--can be user, user-date, task_id, project_id, etc.
- item: jsonrest path to item
- data: array of data client can use
Auriga events are converted to dojo published topics as follows:
dojo.publish('/<module>/<user>', [action, item, data])
[edit] Dojo published:
- /tick/data - called every 30s, meant for recalculating state on entire client system
- /tick/display - called 1ms after all /tick/data funcs have run, so widgets can be sure state is current before rendering
- /timeclock/<user> - (auriga_event) flag that state or data of user's timeclock has changed
- /timeclock/<user>/data - (timeclock.js auriga.loadTimer) publishes the data for a user's timeclock to any interested widgets - arg is timer object
- /timeclock/alarm - trigger alarm events indicating timer is overdue
- /today/<user> - (auriga_event) flag that time entry has been changed for this user (for any date)
- /today/<user>-<date> - (main.js event_loop) flag that time entry/schedule for this date has changed
- /task/<task_id> - (auriga_event) an update to this task
- workpane - {type, module, title, item_id, user_id, date} - open a tab or UI element described by args
- main_tab-selectChild - tab controller for main tab publishes tab changes here
[edit] (old)
- Event (module), [action, user, item]
- "notify", [{message, type, duration }]
- "task_scheduled", [{item}]
- "timeclock"
- "timeclock_data"
global au object: defined in auriga.Timeclock
- au.currTask - task id
- au.timer - return object from timer actions

