Show:

A base class for Options Data Editor.

Constructor

A.OptionsDataEditor

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterClickAddButton

() protected

Fired after the button for adding options is clicked.

_afterEditedValueChange

(
  • event
)
protected

Fired after the editedValue attribute is set.

Parameters:

_afterLabelChange

() protected

<p>Fired after the <code>label</code> attribute is set.</p>

_afterRequiredChange

() protected

<p>Fired after the <code>required</code> attribute is set.</p>

_afterVisibleChange

() protected

<p>Fired after the <code>visible</code> attribute is set.</p>

_createOptionNode

(
  • text
)
Node protected

Creates an option node.

Parameters:

  • text String

Returns:

Node:

_getOptionNodeIndex

(
  • node
)
protected

Gets the option node's index in the options list.

Parameters:

_moveItem

(
  • from
  • to
)
protected

Moves the item from an index to another in the items array.

Parameters:

_onClickRemoveButton

(
  • event
)
protected

Fired when a button for removing an option is clicked.

Parameters:

_onDrag

(
  • event
)
protected

Fired after the drag:drag event is triggered.

Parameters:

_onDragOver

(
  • event
)
protected

Fired after the drag:over event is triggered.

Parameters:

_onValueChange

(
  • event
)
protected

Fired when the value of one of the editors text fields changes.

Parameters:

_removeOptionNode

(
  • optionNode
)
protected

Removes the given option node.

Parameters:

_setUpDrag

() protected

Sets up everything needed for dragging options to different positions.

_uiSetEditedValue

(
  • editedValue
)
protected

Updates the ui according to the value of the editedValue attribute.

Parameters:

  • editedValue Array

_uiSetLabel

(
  • label
)
protected

<p>Updates the ui according to the value of the <code>label</code> attribute.</p>

Parameters:

  • label String

_uiSetRequired

(
  • required
)
protected

<p>Updates the ui according to the value of the <code>required</code> attribute.</p>

Parameters:

  • required Object

_uiSetVisible

(
  • visible
)
protected

<p>Updates the ui according to the value of the <code>visible</code> attribute.</p>

Parameters:

  • visible Object

destructor

() protected

<p>Destructor lifecycle implementation for the <code>A.DataEditor</code> class. Lifecycle.</p>

initializer

() protected

Constructor for the A.OptionsDataEditor. Lifecycle.

isEmpty

() Boolean

Returns true if this edited value has no elements.

Returns:

Boolean:

isValid

() Boolean

If the Option Data Editor has a String in each option field this will return true.

Returns:

Boolean:

Properties

ATTRS

Object static

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

Attributes

editedValue

Boolean

The value after edition.

Default: []

label

String

<p>The label to be used by this boolean editor.</p>

Default: ''

node

Node

<p>The node where the editor UI is rendered.</p>

originalValue

Array

The value to be edited.

Default: []

required

<p>Defines if the data editor is required or not.</p>

Default: false

strings

Object

Collection of strings used to label elements of the UI.

visible

Boolean

<p>Determines if <code>DataEditor</code> is visible or not.</p>

Default: false