Class: FieldDecorationView

Drupal.quickedit. FieldDecorationView

new Drupal.quickedit.FieldDecorationView(options)

Name Type Description
options object

An object with the following keys:

Name Type Description
editorView Drupal.quickedit.EditorView

The editor object view.

Extends

  • Backbone.View

Members

_widthAttributeIsEmptynull

eventsobject

Methods

_getPositionProperties($e){object}

Gets the top and left properties of an element.

Convert extraneous values and information into numbers ready for subtraction.

Name Type Description
$e jQuery

The element to get position properties from.

Returns:
Type Description
object An object containing css values for the needed properties.

Adds padding around the editable element to make it pop visually.

_replaceBlankPosition(pos){string}

Replaces blank or 'auto' CSS position: <value> values with "0px".

Name Type Description
pos string optional

The value for a CSS position declaration.

Returns:
Type Description
string A CSS value that is valid for position.

Removes the padding around the element being edited when editing ceases.

Adds classes used to indicate an elements editable state.

Transition to 'activating' stage.

Name Type Description
event jQuery.Event

The click event.

Starts hover; transitions to 'highlight' state.

Name Type Description
event jQuery.Event

The mouse event.

Stops hover; transitions to 'candidate' state.

Name Type Description
event jQuery.Event

The mouse event.

Removes the class that indicates that an element as editable.

Adds a class to the edited element that indicates whether the field has been changed by the user (i.e. locally) or the field has already been changed and stored before by the user (i.e. remotely, stored in PrivateTempStore).

Adds that class that indicates that an element is highlighted.

Determines the actions to take given a change of state.

Name Type Description
model Drupal.quickedit.FieldModel

The FieldModel model.

state string

The state of the associated field. One of Drupal.quickedit.FieldModel.states.

Removes the class that indicates that an element is being edited.

Reapplies the class that indicates that a candidate editable element is again available to be edited.

Removes the class that indicates that an element is highlighted.

Removes classes used to indicate an elements editable state.