Show:

A base class for ButtonExt.

Constructor

A.ButtonExt

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterIconAlignChange

(
  • event
)
protected

Fires after iconAlign attribute change.

Parameters:

_afterIconChange

(
  • event
)
protected

Fires after icon attribute change.

Parameters:

_setEarlyButtonDomType

(
  • type
)
protected

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

Parameters:

  • type String

_uiSetIcon

(
  • val
)
protected

Adds class name for button icon.

Parameters:

  • val String

_uiSetIconAlign

(
  • val
)
protected

Adds alignment for button icon.

Parameters:

  • val String

getTypedButtonTemplate

(
  • template
  • type
)
String static

Updates the HTML markup specified as the template argument with the passed type.

Parameters:

  • template String
  • type String

Returns:

String:

The parsed template containing the DOM type, e.g. <button {type} /> generates <button type="button" />.

initializer

() protected

Construction logic executed during ButtonExt instantiation. Lifecycle.

setButtonRole

()

Sets the role attribute on the bounding box to 'button';

syncButtonExtUI

()

Updates icon CSS class.

Properties

ATTRS

Object static

Defines the default attribute configuration for the ButtonExt.

HTML_PARSER

Object static

Defines how attribute values are to be parsed from markup contained in ButtonExt.

Attributes

cssClass

String

CSS class to be automatically added to the boundingBox.

domType

String

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

icon

String

Contains a CSS class of the icon to use. A list of icons can be found here.

iconAlign

String

Sets position of icon.

Default: 'left'

iconElement

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

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