Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create and launch a new Ext.Application()

It's time to do away with the old Ext.setup() way of doing things.
  • Loading branch information...
commit 2c24f13ac6c2764816676851b402d9435702caad 1 parent cbae0d7
@nelstrom authored
Showing with 16 additions and 16 deletions.
  1. +1 −1  public/javascripts/data.js
  2. +15 −15 public/javascripts/index.js
View
2  public/javascripts/data.js
@@ -2,7 +2,7 @@ Ext.regModel('Contact', {
fields: ['firstName', 'lastName']
});
-demos.ListStore = new Ext.data.Store({
+ListDemo.ListStore = new Ext.data.Store({
model: 'Contact',
sorters: 'lastName',
getGroupString : function(record) {
View
30 public/javascripts/index.js
@@ -1,46 +1,46 @@
-Ext.ns('sink', 'demos', 'Ext.ux');
-Ext.setup({
- onReady: function() {
+ListDemo = new Ext.Application({
+ name: "ListDemo",
- demos.simpleList = new Ext.List({
+ launch: function() {
+
+ ListDemo.simpleList = new Ext.List({
xtype: 'list',
- store: demos.ListStore,
+ store: ListDemo.ListStore,
itemTpl: '<div class="contact">{firstName} {lastName}</div>'
});
- demos.groupedList = new Ext.List({
- store: demos.ListStore,
+ ListDemo.groupedList = new Ext.List({
+ store: ListDemo.ListStore,
itemTpl: '<div class="contact">{firstName} {lastName}</div>',
grouped: true,
indexBar: true
});
- demos.disclosureList = new Ext.List({
+ ListDemo.disclosureList = new Ext.List({
onItemDisclosure: function(record, btn, index) {
Ext.Msg.alert('Tap', 'Disclose more info for ' + record.get('firstName'), Ext.emptyFn);
},
- store: demos.ListStore,
+ store: ListDemo.ListStore,
itemTpl: '<div class="contact">{firstName} {lastName}</div>'
});
- demos.List = new Ext.TabPanel ({
+ ListDemo.List = new Ext.TabPanel ({
fullscreen: true,
items: [{
title: 'Simple',
- items: [demos.simpleList]
+ items: [ListDemo.simpleList]
}, {
title: 'Grouped',
- items: [demos.groupedList]
+ items: [ListDemo.groupedList]
}, {
title: 'Disclosure',
- items: [demos.disclosureList]
+ items: [ListDemo.disclosureList]
}],
defaults: {
layout: 'fit',
cls: 'demo-list',
}
});
-
-
}
});
+
Please sign in to comment.
Something went wrong with that request. Please try again.