Class: EditableAction

Granite.author.ui. EditableAction

Represents an action on Granite.author.Editables.


new EditableAction(config)

Parameters:
Name Type Description
config Object

The configuration object

Properties
Name Type Argument Description
execute function

The actual action to perform

condition function <optional>

The condition function that tells if the action could be performed

Source:
ui/ui.EditableAction.js

Methods


<abstract> condition(editable [, extraParams])

The condition function that tells if the action could be performed.

Parameters:
Name Type Argument Description
editable Granite.author.Editable

The editable on which the action will be performed

extraParams Object <optional>

Optional parameters needed for the operation

Source:
ui/ui.EditableAction.js
Returns:

Returns true if the action could be performed on the passed editable

Type
boolean

<abstract> execute(editable [, extraParams])

The actual action to perform.

Parameters:
Name Type Argument Description
editable Granite.author.Editable

The editable on which the action will be performed

extraParams Object <optional>

Optional parameters needed for the operation

Source:
ui/ui.EditableAction.js
Returns:
  • Returns a deferred object that is either resolved or rejected depending on the success of the operation
Type
$.Promise