Class CKFinder.ui.dialog.select
Extends
CKFinder.ui.dialog.uiElement.
Constructor Attributes | Constructor Name and Description |
---|---|
CKFinder.ui.dialog.select(dialog, elementDefinition, htmlList)
A select box.
|
Method Attributes | Method Name and Description |
---|---|
add(label, value, index)
Adds an option to the select box.
|
|
Gets the DOM element of the select box.
|
|
remove(index)
Removes an option from the selection list.
|
- Methods borrowed from class CKFinder.ui.dialog.uiElement:
- disable, enable, focus, getDialog, getElement, getValue, isChanged, isEnabled, isVisible, selectParentTab, setValue
Class Detail
CKFinder.ui.dialog.select(dialog, elementDefinition, htmlList)
Since:
2.0
A select box.
Note: the whole CKFinder.ui.dialog namespace is not directly accessible (CKFinder.ui.dialog is undefined).
Instances of this class are created by CKFinder when dialog is created.
Instances of this class are created by CKFinder when dialog is created.
- Parameters:
- {CKFinder.dialog} dialog
- Parent dialog object.
- {CKFinder.dialog.uiElementDefinition} elementDefinition
- The element definition. Accepted fields:
- default (Required) The default value.
- validate (Optional) The validation function.
- items (Required) An array of options. Each option is a 1- or 2-item array of format [ 'Description', 'Value' ]. If 'Value' is missing, then the value would be assumed to be the same as the description.
- multiple (Optional) Set this to true if you'd like to have a multiple-choice select box.
- size (Optional) The number of items to display in the select box.
- {Array} htmlList
- List of HTML code to output to.
Method Detail
{CKFinder.ui.dialog.select}
add(label, value, index)
Since:
2.0
Adds an option to the select box.
- Parameters:
- {String} label
- Option label.
- {String} value
- (Optional) Option value, if not defined it'll be assumed to be the same as the label.
- {Number} index
- (Optional) Position of the option to be inserted to. If not defined the new option will be inserted to the end of list.
- Returns:
- {CKFinder.ui.dialog.select} The current select UI element.
{CKFinder.dom.element}
getInputElement()
Since:
2.0
Gets the DOM element of the select box.
- Returns:
- {CKFinder.dom.element} The <select> element of this UI element.
{CKFinder.ui.dialog.select}
remove(index)
Since:
2.0
Removes an option from the selection list.
- Parameters:
- {Number} index
- Index of the option to be removed.
- Returns:
- {CKFinder.ui.dialog.select} The current select UI element.