Class CKFinder.dialog.definition.fileButton
Extends
CKFinder.dialog.definition.uiElement.
Constructor Attributes | Constructor Name and Description |
---|---|
The definition of a button for submitting the file in a file upload input.
|
Field Attributes | Field Name and Description |
---|---|
The instruction for CKFinder how to deal with file upload.
|
|
An array that contains pageId and elementId of the file upload input element for which this button is created.
|
|
The label of the UI element.
|
|
(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.fileButton()
Since:
2.0
The definition of a button for submitting the file in a file upload input.
This class is not really part of the API. It just illustrates the properties
that developers can use to define and create a button for submitting the file in a file upload input.
Once the dialog is opened, the created element becomes a CKFinder.ui.dialog.fileButton 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.fileButton 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 : 'file', id : 'upload', label : 'Select file from your computer', size : 38 }, { type : 'fileButton', id : 'fileId', label : 'Upload file', 'for' : [ 'tab1', 'upload' ] filebrowser : { onSelect : function( fileUrl, data ) { alert( 'Successfully uploaded: ' + fileUrl ); } } }
Field Detail
{String|Object}
filebrowser
Since:
2.0
The instruction for CKFinder how to deal with file upload.
By default, the file and fileButton elements will not work "as expected" if this attribute is not set.
// Update field with id 'txtUrl' in the 'tab1' tab when file is uploaded. filebrowser : 'tab1:txtUrl' // Call custom onSelect function when file is successfully uploaded. filebrowser : { onSelect : function( fileUrl, data ) { alert( 'Successfully uploaded: ' + fileUrl ); } }
{String}
for
Since:
2.0
An array that contains pageId and elementId of the file upload input element for which this button is created.
[ pageId, elementId ]
{String}
label
Since:
2.0
The label of the UI element.
{Function}
validate
Since:
2.0
(Optional) The validation function.