Class: FieldDecorationView

Drupal.quickedit.FieldDecorationView(options)

new FieldDecorationView(options)

Parameters:
Name Type Description
options object

An object with the following keys:

Properties
Name Type Description
editorView Drupal.quickedit.EditorView

The editor object view.

Source:

Extends

  • Backbone.View

Members

_widthAttributeIsEmpty :null

Type:
  • null
Source:

events :object

Type:
  • object
Source:

Methods

_getPositionProperties($e) → {object}

Gets the top and left properties of an element.

Convert extraneous values and information into numbers ready for subtraction.

Parameters:
Name Type Description
$e jQuery

The element to get position properties from.

Source:
Returns:

An object containing css values for the needed properties.

Type
object

_pad()

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

Source:

_replaceBlankPosition(posopt) → {string}

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

Parameters:
Name Type Attributes Description
pos string <optional>

The value for a CSS position declaration.

Source:
Returns:

A CSS value that is valid for position.

Type
string

_unpad()

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

Source:

decorate()

Adds classes used to indicate an elements editable state.

Source:

onClick(event)

Transition to 'activating' stage.

Parameters:
Name Type Description
event jQuery.Event

The click event.

Source:

onMouseEnter(event)

Starts hover; transitions to 'highlight' state.

Parameters:
Name Type Description
event jQuery.Event

The mouse event.

Source:

onMouseLeave(event)

Stops hover; transitions to 'candidate' state.

Parameters:
Name Type Description
event jQuery.Event

The mouse event.

Source:

prepareEdit()

Removes the class that indicates that an element as editable.

Source:

remove()

{@inheritdoc}

Source:

renderChanged()

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).

Source:

startHighlight()

Adds that class that indicates that an element is highlighted.

Source:

stateChange(model, state)

Determines the actions to take given a change of state.

Parameters:
Name Type Description
model Drupal.quickedit.FieldModel

The FieldModel model.

state string

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

Source:

stopEdit()

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.

Source:

stopHighlight()

Removes the class that indicates that an element is highlighted.

Source:

undecorate()

Removes classes used to indicate an elements editable state.

Source: