Permalink
Browse files

Instantiate toolbar, rather than using config object.

  • Loading branch information...
nelstrom committed Jan 22, 2011
1 parent 6c70b26 commit 9a1910efa9ec9dbb6619a4a2386211e1bbc65f80
Showing with 11 additions and 10 deletions.
  1. +11 −10 public/javascripts/index.js
@@ -3,19 +3,20 @@ ListDemo = new Ext.Application({
launch: function() {
+ ListDemo.detailToolbar = new Ext.Toolbar({
+ items: [{
+ text: 'back',
+ ui: 'back',
+ handler: function() {
+ ListDemo.Viewport.setActiveItem('indexlist');
+ }
+ }]
+ });
+
ListDemo.detailPanel = new Ext.Panel({
id: 'detailpanel',
tpl: 'Hello, {firstName}!',
- dockedItems: [{
- xtype: 'toolbar',
- items: [{
- text: 'back',
- ui: 'back',
- handler: function() {
- ListDemo.Viewport.setActiveItem('indexlist');
- }
- }]
- }]
+ dockedItems: [ListDemo.detailToolbar]
});
ListDemo.listPanel = new Ext.List({

0 comments on commit 9a1910e

Please sign in to comment.