Generate a new Ext.Toolbar
Examples:
var toolBar = new Ext.Toolbar([{
handler: show,
text: "Add",
other: "...",
icon: "..."
},{
handler: Backend.app.loadHtml('/accounts/'+accounts_grid.getSelected().id+'/edit'),
text: "Edit",
other: "..."
}]);
grid.tbar do |bar|
bar.add "Add", :handler => "show".to_l, :icon => "...", :other => "..."
bar.add "Edit", :handler => "Backend.app.loadHtml('/accounts/'+accounts_grid.getSelected().id+'/edit')".to_l, :other => "..."
end
Methods
Public Instance methods
Add new items to a Ext.Toolbar
# Generates: { handler: show, text: "Add", other: "...", icon: "..." }
add_button :text => "Add", :handler => "show".to_l, :icon => "...", :other => "..."
[ show source ]
# File lib/view/helpers/ext/tool_bar.rb, line 35
35: def add_button(options, &block)
36: config[:buttons] << (options.is_a?(String) ? options : Button.new(options, &block).config)
37: end