Namespace: button

Ancestry: Editor » .models. » button

DataTables Editor v1.2.4 documentation

Navigation

Hiding private elements (toggle)
Showing extended elements (toggle)

Model of the buttons that can be used with the Editor#buttons method for creating and displaying buttons (also the Editor#button argument option for the Editor#create, Editor#edit and Editor#remove methods). Although you don't need to extend this object, it is available for reference to show the options available.

Summary

Properties - static

<static> className :string

The CSS class(es) to apply to the button which can be useful for styling buttons which preform different functions each with a distinctive visual appearance.

<static> fn :function

Callback function which the button is activated. For example for a 'submit' button you would call the Editor#submit API method, while for a cancel button you would call the Editor#close API method. Note that the function is executed in the scope of the Editor instance, so you can call the Editor's API methods using the this keyword.

<static> label :string

The text to put into the button. This can be any HTML string you wish as it will be rendered as HTML (allowing images etc to be shown inside the button).

Details

Properties - static

<static> className :string

The CSS class(es) to apply to the button which can be useful for styling buttons which preform different functions each with a distinctive visual appearance.

<static> fn :function

Callback function which the button is activated. For example for a 'submit' button you would call the Editor#submit API method, while for a cancel button you would call the Editor#close API method. Note that the function is executed in the scope of the Editor instance, so you can call the Editor's API methods using the this keyword.

<static> label :string

The text to put into the button. This can be any HTML string you wish as it will be rendered as HTML (allowing images etc to be shown inside the button).