Class ox.Configuration.View
Extends
ox.UI.Container.
Abstract base class of configuration pages.
Defined in: configuration.js.
Constructor Attributes | Constructor Name and Description |
---|---|
ox.Configuration.View(node, title)
Attaches a content page to a leaf node in the configuration tree.
|
Field Attributes | Field Name and Description |
---|---|
Width of child widgets, as a CSS length value.
|
|
DOM node with the content of the view.
|
|
A callback which is called before the view is opened for the first time.
|
- Fields borrowed from class ox.UI.Widget:
- default_value, enabled, formnode, initialized, isEnabled, isVisible, node, parent, visible, width
Method Attributes | Method Name and Description |
---|---|
Reverts modifications made by the user.
|
|
enter()
Performs initialization when the user enters the view.
|
|
leave()
Performs cleanup when the user leaves the view.
|
|
saveView(callback)
Saves view contents.
|
|
Returns whether the view contents were modified and may need to be saved.
|
- Methods borrowed from class ox.UI.Container:
- addCells, addRow, addWidget, deleteWidget, get, set
- Methods borrowed from class ox.UI.Widget:
- addContent, applyEnabled, applyVisible, disable, enable, hide, remove, resize, setEnabled, setParent, setVisible, show
Class Detail
ox.Configuration.View(node, title)
Attaches a content page to a leaf node in the configuration tree.
The order of events for a view is
- #init (first time only),
- #addContent (first time only),
- #enter,
- user edits the view,
- #viewModified
- optionally, either #saveView or #cancelView,
- #leave.
- Parameters:
- {ox.Configuration.LeafNode} node
- A ox.Configuration.LeafNode which will be configured to open this page.
- {I18nString} title
- The page title.
Field Detail
{String}
childWidth
Width of child widgets, as a CSS length value.
- Default Value:
- "20em"
{DOM node}
content
DOM node with the content of the view.
{Function}
init
A callback which is called before the view is opened for the first time.
Usually, child elements are created and added here.
Method Detail
cancelView()
Reverts modifications made by the user.
enter()
Performs initialization when the user enters the view.
leave()
Performs cleanup when the user leaves the view.
saveView(callback)
Saves view contents.
- Parameters:
- {Function} callback
- An optional callback functi which is called after the view is saved.
{Boolean}
viewModified()
Returns whether the view contents were modified and may need to be saved.
- Returns:
- true if the view contents were modified.