From 9f6221e687a4ad1bf6c90ceef8c55bd74af6429f Mon Sep 17 00:00:00 2001 From: Drew Neil Date: Tue, 18 Jan 2011 16:23:30 +0200 Subject: [PATCH] Merge branch 06_add_transitions into master. --- public/javascripts/index.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/public/javascripts/index.js b/public/javascripts/index.js index e929e0b..f1b324b 100644 --- a/public/javascripts/index.js +++ b/public/javascripts/index.js @@ -3,16 +3,6 @@ ListDemo = new Ext.Application({ launch: function() { - ListDemo.disclosureList = new Ext.List({ - id: 'disclosurelist', - onItemDisclosure: function(record, btn, index) { - ListDemo.detailPanel.update(record.data); - ListDemo.Viewport.setActiveItem('detailpanel', {type:'slide',direction:'left'}); - }, - store: ListDemo.ListStore, - itemTpl: '
{firstName} {lastName}
' - }); - ListDemo.detailPanel = new Ext.Panel({ id: 'detailpanel', tpl: 'Hello, {firstName}!', @@ -30,12 +20,25 @@ ListDemo = new Ext.Application({ ] }); + ListDemo.listPanel = new Ext.List({ + id: 'disclosurelist', + store: ListDemo.ListStore, + itemTpl: '
{firstName} {lastName}
', + grouped: true, + onItemDisclosure: function(record, btn, index) { + ListDemo.detailPanel.update(record.data); + ListDemo.Viewport.setActiveItem('detailpanel'); + } + }); + ListDemo.Viewport = new Ext.Panel ({ fullscreen: true, layout: 'card', cardSwitchAnimation: 'slide', - items: [ListDemo.disclosureList, ListDemo.detailPanel] + items: [ListDemo.listPanel, ListDemo.detailPanel] }); + } }); +