Class ox.Configuration.EditableList
Extends
ox.UI.Widget.
An editable list with "Add" and "Remove" buttons in the menu.
Defined in: configuration.js.
Constructor Attributes | Constructor Name and Description |
---|---|
ox.Configuration.EditableList(section, height, label)
|
Field Attributes | Field Name and Description |
---|---|
The text which is displayed in the list when it contains no entries.
|
- Fields borrowed from class ox.UI.Widget:
- default_value, enabled, formnode, initialized, isEnabled, isVisible, node, parent, visible, width
Method Attributes | Method Name and Description |
---|---|
add(cont)
This method is called when the "Add" button is clicked.
|
|
getText(elem)
A callback function which is used to extract a human-readable
description from an array element of the value.
|
|
onDelete(removed, cont, dontDelete)
This method is called when the "Remove" button is clicked.
|
- Methods borrowed from class ox.UI.Widget:
- addContent, applyEnabled, applyVisible, disable, enable, get, hide, remove, resize, set, setEnabled, setParent, setVisible, show
Class Detail
ox.Configuration.EditableList(section, height, label)
- Parameters:
- {I18nString} section
- Name of the menu section.
- {String} height
- The height of the list as a CSS length.
- {I18nString} label
- An optional label for the list.
Field Detail
{I18nString}
emptyText
The text which is displayed in the list when it contains no entries.
Method Detail
add(cont)
This method is called when the "Add" button is clicked.
- Parameters:
- {Function} cont
- A callback function which should be called with an array of new elements as parameter.
{String}
getText(elem)
A callback function which is used to extract a human-readable
description from an array element of the value. This description is
displayed in the list. The default implementation handles I18nString
objects and plain strings.
- Parameters:
- elem
- The array element from which to extract the description.
- Returns:
- A textual description of the specified element.
onDelete(removed, cont, dontDelete)
This method is called when the "Remove" button is clicked.
- Parameters:
- {Array} removed
- An array with currently selected values.
- {Function} cont
- A callback function which should be called after all side effects have been performed. This function performs the actual removal. If it is not called, no entries are removed from the list.
- {Function} dontDelete
- A function which can be used to cancel
the removal of individual values. For each value which should be kept, this
function should be called with the index of the value in the array
removed
as parameter.