beforetoolbarcreated:String

This event is triggered before the Toolbar initialization. Use this event to override the default functionality of the Toolbar and customize it without changing webdatarocks.toolbar.js. As an argument beforetoolbarcreated gets toolbar Object. Override the existing tabs and set the custom ones using getTabs() method.

Each tab Object has the following properties:

Name Type Description
title String A label of the tab.
id String Id is used in CSS styles
handler String Name of the function that handles click on this tab.
icon String HTML tag that contains a custom icon for this new tab. You can choose one of the basic vector icons defined in webdatarocks.toolbar.js file.
args Any optionalArgument to pass to handler.
menu Array optionalDropdown menu items.
mobile Boolean optionalIf false, this tab isn’t shown on mobile devices.
ios Boolean optionalIf false, this tab isn’t shown on iOS devices.
android Boolean optionalIf false, this tab isn’t shown on Android devices.

Example

This sample shows how to add tabs to the Toolbar:

Read a detailed Customizing Toolbar tutorial to change a view and functionality of the Toolbar.