Created
October 12, 2011 04:51
-
-
Save k33g/1280319 to your computer and use it in GitHub Desktop.
Coffeescript version of "Getting Started with Sencha Touch 2"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see http://docs.sencha.com/touch/2-0/#!/guide/getting_started | |
class TabPanel extends Ext.TabPanel | |
constructor:-> | |
super | |
fullscreen : true | |
tabBarPosition: 'bottom' | |
items : [ | |
{ | |
title : 'Home' | |
iconCls : 'home' | |
cls : 'home' | |
html : | |
' | |
<img src="http://staging.sencha.com/img/sencha.png"/> | |
<h1>Welcome to Sencha Touch</h1> | |
to use tabs, lists and forms to create a simple app</p> | |
<h2>Sencha Touch (2.0.0pr1)</h2> | |
' | |
} | |
{ | |
xtype : 'list' | |
title : 'blog' | |
iconCls : 'star' | |
itemTpl : '{title}' | |
store : | |
fields : ['title', 'url'] | |
data : [ | |
{title: 'Ext Scheduler 2.0', url: 'ext-scheduler-2-0-upgrading-to-ext-js-4'} | |
{title: 'Previewing Sencha Touch 2', url: 'sencha-touch-2-what-to-expect'} | |
{title: 'Sencha Con 2011', url: 'senchacon-2011-now-packed-with-more-goodness'} | |
{title: 'Documentation in Ext JS 4', url: 'new-ext-js-4-documentation-center'} | |
] | |
} | |
] | |
@setActiveItem 1 | |
class Application extends Ext.application | |
constructor:(name)-> | |
super | |
name : name | |
launch : -> | |
new TabPanel() | |
MyApp = new Application "Sencha" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment