Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch TabPanel to a Panel with card layout.

The onItemDisclosure function now reveals a 'Hello, World!' panel.
  • Loading branch information...
commit 7ba77ff04ca72f637377d53333389ceb0a9e3b3f 1 parent d984187
@nelstrom authored
Showing with 11 additions and 16 deletions.
  1. +9 −16 public/javascripts/index.js
  2. +2 −0  todo.otl
View
25 public/javascripts/index.js
@@ -18,28 +18,21 @@ ListDemo = new Ext.Application({
ListDemo.disclosureList = new Ext.List({
onItemDisclosure: function(record, btn, index) {
- Ext.Msg.alert('Tap', 'Disclose more info for ' + record.get('firstName'), Ext.emptyFn);
+ ListDemo.Viewport.setActiveItem('detailpanel');
},
store: ListDemo.ListStore,
itemTpl: '<div class="contact">{firstName} {lastName}</div>'
});
- ListDemo.List = new Ext.TabPanel ({
+ ListDemo.detailPanel = new Ext.Panel({
+ id: 'detailpanel',
+ html: 'Hello, world!'
+ });
+
+ ListDemo.Viewport = new Ext.Panel ({
fullscreen: true,
- items: [{
- title: 'Simple',
- items: [ListDemo.simpleList]
- }, {
- title: 'Grouped',
- items: [ListDemo.groupedList]
- }, {
- title: 'Disclosure',
- items: [ListDemo.disclosureList]
- }],
- defaults: {
- layout: 'fit',
- cls: 'demo-list',
- }
+ layout: 'card',
+ items: [ListDemo.disclosureList, ListDemo.detailPanel]
});
}
});
View
2  todo.otl
@@ -1,2 +1,4 @@
[X] switch from `Ext.setup()` to `new Ext.Application()`
[_] reveal a detail panel onItemDisclosure
+ [_] add a toolbar to detailpanel, with back button
+ [_] use a slide transition when switching active card
Please sign in to comment.
Something went wrong with that request. Please try again.