Skip to content

Latest commit

 

History

History
127 lines (88 loc) · 3.96 KB

events.rst

File metadata and controls

127 lines (88 loc) · 3.96 KB

Events

The back-office of Novius OS is one "big HTML page". Actions performed in one tab can affect other tabs (ex: adding, modifying or deleting an item).

An event system has been established to enable the various interface elements to communicate with each other.

On the one side, the interface elements are listening to events (by binding callbacks functions) by connecting to dispatchers <dispatcher>.
On the other side, the different actions trigger events, usually returned by AJAX requests (see :js$container.nosAjax), which are then dispatched to all interface elements via dispatchers <dispatcher>.

Dispatched events are executed immediately on the current active tab or popup (the one which has focus). For other tabs (or popups), they are executed only when the tab or popup becomes active / focused.

dispatcher
A DOM element that receives system events. The child elements of the dispatcher can listen for events by connecting to it.
Each tab and popup have a dispatcher.

Structure of an event

nosListenEvent

nosUnlistenEvent

nosDispatchEvent