Class: EntityToolbarView

Drupal.quickedit.EntityToolbarView(options)

new EntityToolbarView(options)

Parameters:
Name Type Description
options object

Options to construct the view.

Properties
Name Type Description
appModel Drupal.quickedit.AppModel

A quickedit AppModel to use in the view.

Source:

Extends

  • Backbone.View

Members

_fieldToolbarRoot :jQuery

Type:
Source:

Methods

_find(toolgroup) → {jQuery}

Finds a toolgroup.

Parameters:
Name Type Description
toolgroup string

A toolgroup name.

Source:
Returns:

The toolgroup DOM element.

Type
jQuery

addClass(toolgroup, classes)

Adds classes to a toolgroup.

Parameters:
Name Type Description
toolgroup string

A toolgroup name.

classes string

A string of space-delimited class names that will be applied to the wrapping element of the toolbar group.

Source:

buildToolbarEl() → {jQuery}

Builds the entity toolbar HTML; attaches to DOM; sets starting position.

Source:
Returns:

The toolbar element.

Type
jQuery

events() → {object}

Source:
Returns:

A map of events.

Type
object

fieldStateChange(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:

getToolbarRoot() → {jQuery}

Returns the DOM element that fields will attach their toolbars to.

Source:
Returns:

The DOM element that fields will attach their toolbars to.

Type
jQuery

label()

Generates a state-dependent label for the entity toolbar.

Source:

onClickCancel(event)

Sets the model state to candidate when the cancel button is clicked.

Parameters:
Name Type Description
event jQuery.Event

The click event.

Source:

onClickSave(event)

Set the model state to 'saving' when the save button is clicked.

Parameters:
Name Type Description
event jQuery.Event

The click event.

Source:

onMouseenter(event)

Clears the timeout that will eventually reposition the entity toolbar.

Without this, it may reposition itself, away from the user's cursor!

Parameters:
Name Type Description
event jQuery.Event

The mouse event.

Source:

position(elementopt)

Uses the Popper() method to position the entity toolbar.

Parameters:
Name Type Attributes Description
element HTMLElement <optional>

The element against which the entity toolbar is positioned.

Source:

remove()

{@inheritdoc}

Source:

removeClass(toolgroup, classes)

Removes classes from a toolgroup.

Parameters:
Name Type Description
toolgroup string

A toolgroup name.

classes string

A string of space-delimited class names that will be removed from the wrapping element of the toolbar group.

Source:

render() → {Drupal.quickedit.EntityToolbarView}

{@inheritdoc}

Source:
Returns:

The entity toolbar view.

Type
Drupal.quickedit.EntityToolbarView

show(toolgroup)

Shows a toolgroup.

Parameters:
Name Type Description
toolgroup string

A toolgroup name.

Source:

windowChangeHandler(event)

Repositions the entity toolbar on window scroll and resize.

Parameters:
Name Type Description
event jQuery.Event

The scroll or resize event.

Source: