Button(options, $el)

Class Button UI

new Button(options, $el)

Creates an instance of Button.

Parameters:
Name Type Description
options object

button options

$el jquery

button rootElement

options.className string

button class name

options.command string

command name to execute on click

options.event string

event name to trigger on click

options.text string

text on button

options.tooltip string

text on tooltip

options.style string

button style

options.state string

button state

Deprecated:
  • Yes

Extends

Members

static className :String

ToolbarItem className

static name :String

item name

Methods

destroy()

destroy

Inherited From:

disable()

disable button

enable()

enable button

getName() → {string}

get the name of the toolbar item

Returns:
string -
  • the name of the toolbar item
Inherited From:

isEnabled() → {Boolean}

check whether this button is enabled

Returns:
Boolean -
  • true for enabled

off(type, fn)

unbind event handler

Parameters:
Name Type Description
type string

event name and selector

fn function

handler function

Inherited From:

on(aType, aFn)

Parameters:
Name Type Description
aType string | object

event name and selector string

aFn function

event handler

Inherited From:

remove()

remove

Inherited From:

setTooltip(text)

set tooltip text

Parameters:
Name Type Description
text string

tooltip text to show

trigger(…args)

trigger event

Parameters:
Name Type Attributes Description
args object <repeatable>

event name & extra params

Inherited From: