Class CKFinder.dialog.definition.select
Extends
CKFinder.dialog.definition.uiElement.
Constructor Attributes | Constructor Name and Description |
---|---|
The definition of a select element.
|
Field Attributes | Field Name and Description |
---|---|
The default value.
|
|
An array of options.
|
|
The label of the UI element.
|
|
(Optional) Set this to true if you'd like to have a multiple-choice select box.
|
|
(Optional) The number of items to display in the select box.
|
|
(Optional) The validation function.
|
- Fields borrowed from class CKFinder.dialog.definition.uiElement:
- accessKey, className, hidden, id, onBlur, onChange, onClick, onDblclick, onFocus, onHide, onKeyDown, onKeypress, onKeyup, onLoad, onMousedown, onMouseout, onMouseover, onMouseup, onShow, style, title, type
Class Detail
CKFinder.dialog.definition.select()
Since:
2.0
The definition of a select element.
This class is not really part of the API. It just illustrates the properties
that developers can use to define and create select elements.
Once the dialog is opened, the created element becomes a CKFinder.ui.dialog.select object and can be accessed with CKFinder.dialog#getContentElement.
For a complete example of dialog definition, please check CKFinder.dialog.add.
Once the dialog is opened, the created element becomes a CKFinder.ui.dialog.select object and can be accessed with CKFinder.dialog#getContentElement.
// There is no constructor for this class, the user just has to define an // object with the appropriate properties. // Example: { type : 'select', id : 'sport', label : 'Select your favourite sport', items : [ [ 'Basketball' ], [ 'Baseball' ], [ 'Hockey' ], [ 'Football' ] ], 'default' : 'Football', onChange : function( api ) { // this = CKFinder.ui.dialog.select alert( 'Current value: ' + this.getValue() ); } }
Field Detail
{String}
default
Since:
2.0
The default value.
{Array}
items
Since:
2.0
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.
{String}
label
Since:
2.0
The label of the UI element.
{Boolean}
multiple
Since:
2.0
(Optional) Set this to true if you'd like to have a multiple-choice select box.
- Default Value:
- false
{Number}
size
Since:
2.0
(Optional) The number of items to display in the select box.
{Function}
validate
Since:
2.0
(Optional) The validation function.