Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a toolbar with back button to detailpanel.

  • Loading branch information...
commit 4244d0c952cd19648d5140e1db0673e36bc05e8f 1 parent 7ba77ff
@nelstrom authored
Showing with 15 additions and 1 deletion.
  1. +14 −1 public/javascripts/index.js
  2. +1 −0  todo.otl
View
15 public/javascripts/index.js
@@ -17,6 +17,7 @@ ListDemo = new Ext.Application({
});
ListDemo.disclosureList = new Ext.List({
+ id: 'disclosurelist',
onItemDisclosure: function(record, btn, index) {
ListDemo.Viewport.setActiveItem('detailpanel');
},
@@ -26,7 +27,19 @@ ListDemo = new Ext.Application({
ListDemo.detailPanel = new Ext.Panel({
id: 'detailpanel',
- html: 'Hello, world!'
+ html: 'Hello, world!',
+ dockedItems: [
+ {
+ xtype: 'toolbar',
+ items: [{
+ text: 'back',
+ ui: 'back',
+ handler: function() {
+ ListDemo.Viewport.setActiveItem('disclosurelist');
+ }
+ }]
+ }
+ ]
});
ListDemo.Viewport = new Ext.Panel ({
View
1  todo.otl
@@ -1,4 +1,5 @@
[X] switch from `Ext.setup()` to `new Ext.Application()`
[_] reveal a detail panel onItemDisclosure
[_] add a toolbar to detailpanel, with back button
+ [_] add a template for detailpanel, and pass it the current item
[_] use a slide transition when switching active card
Please sign in to comment.
Something went wrong with that request. Please try again.