core/inplace_editable

AJAX helper for the inline editing a value.

This script is automatically included from template core/inplace_editable It registers a click-listener on [data-inplaceeditablelink] link (the "inplace edit" icon), then replaces the displayed value with an input field. On "Enter" it sends a request to web service core_update_inplace_editable, which invokes the specified callback. Any exception thrown by the web service (or callback) is displayed as an error popup.

Source:
Since:
  • 3.1
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Methods

(inner) getInplaceEditable(parent) → {Object|undefined}

Source:

Return an object to interact with the current inplace editables at a frontend level.

Parameters:
Name Type Description
parent Element

the parent element containing a inplace editable

Returns:

an object to interact with the inplace element, or undefined if no inplace editable is found.

Type
Object | undefined

(inner) getItemId() → {string}

Source:

Return the inplace editable itemid.

Returns:

the current itemid

Type
string

(inner) getValue() → {string}

Source:

Get the value from the inplace editable.

Returns:

the current inplace value

Type
string

(inner) setValue(newvalue)

Source:

Force a value change.

Parameters:
Name Type Description
newvalue string

the new value

Fires: