Gaia/Settings/docs: Difference between revisions

Jump to navigation Jump to search
Line 20: Line 20:
All panels are delay loaded. HTML elements of a panel are created and appended to the DOM tree only when users navigate to the panel. Settings app then loads the associated module of the panel and execute it.
All panels are delay loaded. HTML elements of a panel are created and appended to the DOM tree only when users navigate to the panel. Settings app then loads the associated module of the panel and execute it.


The associated module is usually deriving from "'''SettingsPanel'''"(js/modules/settings_panel.js) or "'''Panel'''"(js/modules/panel.js). '''Panel''' provides the basic functionality that allows settings app to control the visibility and life cycle. In addition to that, '''SettingsPanel''' further creates bindings between the UI elements and the settings database when the module is being initialized. Details of creating an associated module please refer to [https://github.com/mozilla-b2g/gaia/tree/master/apps/settings#modulepaneljs here].
The associated module is usually deriving from '''"SettingsPanel"'''(js/modules/settings_panel.js) or '''"Panel"'''(js/modules/panel.js). '''Panel''' provides the basic functionality that allows settings app to control the visibility and life cycle. In addition to that, '''SettingsPanel''' further creates bindings between the UI elements and the settings database when the module is being initialized. This part is handled in '''"PanelUtils"'''(js/modules/panel_utils.js). Details of creating an associated module please refer to [https://github.com/mozilla-b2g/gaia/tree/master/apps/settings#modulepaneljs here].


=== Panel Navigation ===
=== Panel Navigation ===
Confirmed users
502

edits

Navigation menu