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:

_domTypeValidator

(
  • type
)
protected

<p>Checks if the domType attribute has a valid value.</p>

Parameters:

  • type String

_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>

renderButtonExtUI

() protected

<p>Includes default button classes if necessary. Fires after <code>renderUI</code> method.</p>

setButtonRole

() protected

<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>

discardDefaultButtonCssClasses

Boolean

<p>Defines if the button will discard the default button classes.</p>

Default: false

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>")'