Code Index

Namespaces

Classes


Class CKFinder.dialog.definition.textInput


Extends CKFinder.dialog.definition.uiElement.

Class Summary
Constructor Attributes Constructor Name and Description
 
The definition of a text field (single line).
Field Summary
Field Attributes Field Name and Description
 
The default value.
 
The label of the UI element.
 
(Optional) The maximum length.
 
(Optional) The size of the input field.
 
(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.textInput()
Since: 2.0
The definition of a text field (single line).
This class is not really part of the API. It just illustrates the properties that developers can use to define and create text fields.

Once the dialog is opened, the created element becomes a CKFinder.ui.dialog.textInput object and can be accessed with CKFinder.dialog#getContentElement.
For a complete example of dialog definition, please check CKFinder.dialog.add.
// There is no constructor for this class, the user just has to define an
// object with the appropriate properties.

{
	type : 'text',
	id : 'name',
	label : 'Your name',
	'default' : '',
	validate : function() {
		if ( !this.getValue() )
		{
			api.openMsgDialog( '', 'Name cannot be empty.' );
			return false;
		}
	}
}
Field Detail
{String} default
Since: 2.0
The default value.

{String} label
Since: 2.0
The label of the UI element.

{Number} maxLength
Since: 2.0
(Optional) The maximum length.

{Number} size
Since: 2.0
(Optional) The size of the input field.

{Function} validate
Since: 2.0
(Optional) The validation function.

Copyright © 2007-2015, CKSource - Frederico Knabben. All rights reserved.