Show:

A base class for A.FormBuilderFieldToolbar.

Constructor

A.FormBuilderFieldToolbar

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterItemsChange

() protected

Fired after the items attribute is changed.

_getFieldFromEvent

(
  • event
)
A.FormBuilderFieldBase protected

Gets the form builder field from the event's target node.

Parameters:

_getItemFromEvent

(
  • event
)
Object protected

Gets the item object that represents the event's target node.

Parameters:

Returns:

Object:

_onFieldClick

(
  • event
)
protected

Fired when a field is clicked.

Parameters:

_onFieldMouseEnter

(
  • event
)
protected

Fires when mouse enters on field.

Parameters:

_onFieldMouseLeave

() protected

Fires when mouse leaves the field.

_onItemClick

(
  • event
)
protected

Fired when one of the toolbar items is clicked.

Parameters:

_onToggleClick

() protected

Fired when the toolbar's toggle is clicked.

_uiSetItems

(
  • items
)
protected

Updates the UI according to the value of the items attribute.

Parameters:

  • items Array

addForField

(
  • field
)

Adds the toolbar for the given field.

Parameters:

destructor

() protected

Destructor lifecycle implementation for the A.FormBuilderFieldToolbar class. Lifecycle.

getItem

(
  • selector
)
Node

Finds one toolbar's item using the selector.

Parameters:

  • selector String

Returns:

Node:

initializer

() protected

Construction logic executed during the A.FormBuilderFieldToolbar instantiation. Lifecycle.

remove

()

Removes the toolbar from the DOM.

Properties

ATTRS

Object static

Static property used to define the default attribute configuration for the A.FormBuilderFieldToolbar.

Attributes

disabled

Boolean

Attribute that prevents users interact with the toolbar

formBuilder

A.FormBuilder

The form builder instance that this toolbar will be used with.

items

Array

The items that should show up in the field toolbar. Each item should be represented by an object with the following keys: handler - (Optional) If present, the name of a function from the form builder to be called when this item is clicked. iconClass: The icon css class that should be used by this item.

Default: []