w2toolbar.item_template

Template for the item object
Object, default = {...} // see below
The .item_template property defines default values for the toolbar item. This template is used when new toolbar items are created. An item object has the following structure: There are 13 types of toolbar items
button regular button
check check button (see .checked property.
radio radio button (see .checked and .group property
menu drop down menu. The .items property will be treated as menu items. This property either an array of strings or array of objects. If it is array of string, then each element of the array is a menu item. If it is array of object, then each element of the array is an object of the following type: There are several default icons in w2ui.css file you can use or you can create your own css file with icons. Majority of default icons are used in w2grid. Default icons are: icon-folder, icon-page, icon-reload, icon-columns, icon-search, icon-add, icon-delete, icon-save, icon-edit, icon-bullet-black
menu-check drop down menu of check boxes. It is similar to the menu item, but displays a checkbox next to the menu item. You can check what checkboxes are selected if you read .selected property (toolbar item not menu item). In case of menu-check it is an array of ids of the selected items.
menu-radio drop down menu of radio buttons. It is similar to the menu item, but displays a radio button next to the menu item. You can check what radio button is selected if you read .selected property (toolbar item not menu item). In case of menu-radio it is a single value that is the id of the selected item
drop simple drop down, whatever in .html property will be display in the drop down
html html item, this html will be displayed instead of the toolbar item
color color picker drop down, see .color and .transparent properties.
text-color color picker drop down for text, see .color, .transparent properties.
break horizontal separator
spacer horizontal spacer, will push all following buttons to the right hand side
new-line vertical separator

User Comments

comments powered by Disqus