Class inputEx.InPlaceEdit
- extends inputEx.Field
Meta field providing in place editing (the editor appears when you click on the formatted value).
Constructor
inputEx.InPlaceEdit
(
options
)
- Parameters:
-
options
<Object>
Added options:
- visu
- editorField
- animColors
Methods
void
close
(
)
Close the editor when calling the close function on this field
void
closeEditor
(
e
)
Close the editor on cancel (cancel button, blur event or escape key)
- Parameters:
-
e
<Event>
The original event (click, blur or keydown)
void
disable
(
)
Override disable to Disable openEditor
void
enable
(
)
Override enable to Enable openEditor
Any
getValue
(
)
Returned the previously stored value
- Returns:
Any
- The value of the subfield
void
initEvents
(
)
Adds the events for the editor and color animations
void
onCancelEditor
(
e
)
Close the editor on cancel (cancel button, blur event or escape key)
- Parameters:
-
e
<Event>
The original event (click, blur or keydown)
void
onKeyDown
(
e
)
Handle the tabulation key to close the editor
- Parameters:
-
e
<Event>
The original keydown event
void
onKeyUp
(
e
)
Handle some keys events to close the editor
- Parameters:
-
e
<Event>
The original keyup event
void
onOkEditor
(
)
Validate the editor (ok button, enter key or tabulation key)
void
onVisuMouseOut
(
e
)
Start the color animation when hovering the field
- Parameters:
-
e
<Event>
The original mouseout event
void
onVisuMouseOver
(
e
)
Set the color when hovering the field
- Parameters:
-
e
<Event>
The original mouseover event
void
openEditor
(
)
Display the editor
void
renderComponent
(
)
Override renderComponent to create 2 divs: the visualization one, and the edit in place form
void
renderEditor
(
)
Render the editor
void
renderVisuDiv
(
)
Create the div that will contain the visualization of the value
void
setOptions
(
options
)
Set the default values of the options
- Parameters:
-
options
<Object>
Options object as passed to the constructor
void
setValue
(
value
,
[sendUpdatedEvt]
)
Set the value and update the display
- Parameters:
-
value
<Any>
The value to set
-
[sendUpdatedEvt]
<boolean>
(optional) Wether this setValue should fire the 'updated' event or not (default is true, pass false to NOT send the event)
clear,
close,
destroy,
disable,
displayMessage,
enable,
fireUpdatedEvt,
focus,
getEl,
getParentField,
getState,
getStateString,
getValue,
hide,
initEvents,
isDisabled,
isEmpty,
onBlur,
onChange,
onFocus,
render,
renderComponent,
setClassFromState,
setFieldName,
setOptions,
setParentField,
setValue,
show,
validate