CKEDITOR.ui.dialog.fileButton
A button for submitting the file in a file upload input.
Filtering
Properties
-
eventProcessors : Object
Defines the
onChange
event andonClick
for button element definitions.
Methods
-
constructor( dialog, elementDefinition, htmlList ) → fileButton
Creates a fileButton class instance.
Parameters
dialog : dialog
Parent dialog window object.
elementDefinition : uiElement
The element definition. Accepted fields:
for
(Required) The file input's page and element ID to associate with, in a two-item array format:[ 'page_id', 'element_id' ]
.validate
(Optional) The validation function.
htmlList : Array
List of HTML code to output to.
Returns
-
Handler for the element's access key down event. Simulates a mouse down to the button.
-
Handler for the element's access key up event. Simulates a click to the button.
-
click() → Object
Simulates a click to the button.
Returns
Object
Return value of the
click
event.
-
disable()
Disables the button.
-
enable()
Enables the button.
-
Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page.
-
Gets the parent dialog object containing this UI element.
-
getElement() → element
Gets the root DOM element of this dialog UI object.
-
Gets the DOM element that the user inputs values.
-
getValue() → Object
Gets the current value of this dialog UI object.
var myValue = uiElement.getValue();
Returns
Object
The current value.
-
isChanged() → Boolean
Tells whether the UI object's value has changed.
if ( uiElement.isChanged() ) confirm( 'Value changed! Continue?' );
Returns
Boolean
true
if changed,false
if not changed.
-
isEnabled() → Boolean
-
isFocusable() → Boolean
Determines whether an UI element is focus-able or not. Focus-able is defined as being both visible and enabled.
Returns
Boolean
Whether the UI element can be focused.
-
isVisible() → Boolean
Checks whether a field is visible.
Returns
Boolean
-
registerEvents( definition ) → uiElement
chainable
Registers the
on*
event handlers defined in the element definition.The default behavior of this function is:
- If the on* event is defined in the class's eventProcesors list, then the registration is delegated to the corresponding function in the eventProcessors list.
- If the on* event is not defined in the eventProcessors list, then register the event handler under the corresponding DOM event of the UI element's input DOM element (as defined by the return value of getInputElement).
This function is only called at UI element instantiation, but can be overridded in child classes if they require more flexibility.
Parameters
definition : uiElement
The UI element definition.
Returns
uiElement
this
-
selectParentTab() → uiElement
chainable
Selects the parent tab of this element. Usually called by focus() or overridden focus() methods.
-
Sets the value of this dialog UI object.
uiElement.setValue( 'Dingo' );
Parameters
value : Object
The new value.
noChangeEvent : Boolean
Internal commit, to supress
change
event on this element.
Returns
uiElement
this
Events
-
change( evt )
Fired when the value of the uiElement is changed.
Parameters
evt : eventInfo
-
formLoaded( evt )
Fired when the inner frame created by the element is ready. Each time the button is used or the dialog window is loaded, a new form might be created.
Parameters
evt : eventInfo