Confirmed users
502
edits
(→Panel) |
|||
| 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 | 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 === | ||