/// Ext.application({ name: 'Sencha', launch: function() { Ext.Viewport.add( { xtype: 'tabpanel', fullscreen: true, tabBarPosition: 'bottom', items: [ { title: 'Home', iconCls: 'home', cls: 'home', html: [ '', 'Welcome to Sencha Touch', "Building the Getting Started app.", 'Sencha Touch' ].join("") }, { xtype: 'nestedlist', title: 'Blog', iconCls: 'star', cls: 'blog', displayField: 'title', store: { type: 'tree', fields: ['title', 'link', 'author', 'contentSnippet', 'content', { name: 'leaf', defaultValue: true }], root: { leaf: false }, proxy: { type: 'jsonp', url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog', reader: { type: 'json', rootProperty: 'responseData.feed.entries' } } }, detailCard: { xtype: 'panel', scrollable: true, styleHtmlContent: true }, listeners: { itemtap: function(nestedList, list, index, element, post) { this.getDetailCard().setHtml(post.get('content')); } } }, { xtype: 'formpanel', title: 'Contact Us', iconCls: 'user', url: 'contact.php', layout: 'vbox', items: [ { xtype: 'fieldset', title: 'Contact Us', instructions: 'Email address is optional', items: [ { xtype: 'textfield', label: 'Name', name: 'name' }, { xtype: 'emailfield', label: 'Email', name: 'email' }, { xtype: 'textareafield', label: 'Message', name: 'message', height: 90 } ] }, { xtype: 'button', text: 'Send', ui: 'confirm', handler: function() { var form = this.up('formpanel'); form.submit({ success: function() { Ext.Msg.alert('Thank You', 'Your message has been received', function() { form.reset(); }); } }); } } ] } ] }); } });
Building the Getting Started app.