new Buttons()
Main Buttons class constructor
Methods
(private, static) _createItem(label, icon, desc, data, selector)
Create a new button list item
Parameters:
Name | Type | Description |
---|---|---|
label |
String | The label for the item |
icon |
String | The icon for the button if any |
desc |
String | The description for the button if any |
data |
String | The data attribute for the button |
selector |
String | Optional selector for the item |
(private, static) _getElements()
Creates the default elements required for the component, in the case of the simple.buttons it creates the default ul element for the list items of the buttons
(private, static) _handleClick()
Handles a button click event and determines the callback method to execute for the action
(private, static) _initialize(options, data)
Initialize the component and set the default properties
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options for the component instance |
data |
Object | The data for the component instance |
(private, static) _removeEvents()
Override the default remove events action and remove events from the buttons
(private, static) _render()
Render the buttons if the data has been supplied
(private, static) _setEvents()
Bind the click events to the buttons
(static) destroy()
Destroy the button component and the buttons generated