Show:

A base class for ToggleButton.

Constructor

A.ToggleButton

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterCssClassChange

(
  • event
)
protected

Fires after the value of the cssClass attribute change.

Parameters:

_afterIconAlignChange

(
  • event
)
protected

<p>Fires after <code>iconAlign</code> attribute change.</p>

Parameters:

_afterIconChange

(
  • event
)
protected

<p>Fires after <code>icon</code> attribute change.</p>

Parameters:

_setEarlyButtonDomType

(
  • type
)
protected

<p>Sets button type on bounding box template before constructor is invoked. The type is set before widget creates the bounding box node.</p>

Parameters:

  • type String

_uiSetCssClass

(
  • newVal
  • prevVal
)
protected

Applies the CSS classes to the boundingBox and contentBox.

Parameters:

  • newVal String
  • prevVal String

_uiSetIcon

(
  • val
)
protected

<p>Adds class name for button icon.</p>

Parameters:

  • val String

_uiSetIconAlign

(
  • val
)
protected

<p>Adds alignment for button icon.</p>

Parameters:

  • val String

initializer

() protected

<p>Construction logic executed during <code>ButtonExt</code> instantiation. Lifecycle.</p>

setButtonRole

()

<p>Sets the role attribute on the bounding box to 'button';</p>

syncButtonExtUI

()

<p>Updates icon CSS class.</p>

Attributes

cssClass

String

<p>CSS class to be automatically added to the <code>boundingBox</code>.</p>

domType

String

<p>Defines the HTML type attribute of element e.g. <code><input type="button"></code>.</p>

icon

String

<p>Contains a CSS class of the icon to use. A list of icons can be found <a href="http://liferay.github.io/alloy-bootstrap/base-css.html#icons">here</a>.</p>

iconAlign

String

<p>Sets position of icon.</p>

Default: 'left'

iconElement

<p>Defines markup template for icon, passed in as a node e.g. <code>Y.Node.create('<span></span>')</code>.</p>

Default: 'A.Node.create("<span></span>")'