new FieldDecorationView(options)
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
object | An object with the following keys: Properties
|
Extends
- Backbone.View
Members
_widthAttributeIsEmpty :null
Type:
- null
events :object
Type:
- object
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. |
Returns:
An object containing css values for the needed properties.
- Type
- object
_pad()
Adds padding around the editable element to make it pop visually.
_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. |
Returns:
A CSS value that is valid for position
.
- Type
- string
_unpad()
Removes the padding around the element being edited when editing ceases.
decorate()
Adds classes used to indicate an elements editable state.
onClick(event)
Transition to 'activating' stage.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The click event. |
onMouseEnter(event)
Starts hover; transitions to 'highlight' state.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The mouse event. |
onMouseLeave(event)
Stops hover; transitions to 'candidate' state.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The mouse event. |
prepareEdit()
Removes the class that indicates that an element as editable.
remove()
{@inheritdoc}
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).
startHighlight()
Adds that class that indicates that an element is highlighted.
stateChange(model, state)
Determines the actions to take given a change of state.
Parameters:
Name | Type | Description |
---|---|---|
model |
Drupal.quickedit.FieldModel | The |
state |
string | The state of the associated field. One of
|
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.
stopHighlight()
Removes the class that indicates that an element is highlighted.
undecorate()
Removes classes used to indicate an elements editable state.