Permalink
Browse files

Merge branch '08_refactor_complex_types'

  • Loading branch information...
2 parents 716a463 + 61271b4 commit 89abf483f70433923fc6fd8407add52b9da95677 @nelstrom committed Apr 7, 2011
@@ -1,16 +1,22 @@
ToolbarDemo.views.Viewport = Ext.extend(Ext.TabPanel, {
fullscreen: true,
- tabBar: {
- dock: 'bottom',
- layout: {
- pack: 'center'
- }
- },
- items: [
- { xtype: 'homecard', id: 'home' },
- { xtype: 'searchcard' },
- { xtype: 'actioncard' },
- { xtype: 'settingscard' },
- { xtype: 'morecard' }
- ]
+
+ initComponent: function() {
+ Ext.apply(this, {
+ tabBar: {
+ dock: 'bottom',
+ layout: {
+ pack: 'center'
+ }
+ },
+ items: [
+ { xtype: 'homecard', id: 'home' },
+ { xtype: 'searchcard' },
+ { xtype: 'actioncard' },
+ { xtype: 'settingscard' },
+ { xtype: 'morecard' }
+ ]
+ });
+ ToolbarDemo.views.Viewport.superclass.initComponent.apply(this, arguments);
+ }
});
@@ -75,13 +75,20 @@
iconCls: "action",
styleHtmlContent: true,
html: "placeholder text",
- dockedItems: [
- topbar,
- //textButtonShapes,
- //textButtonColors,
- //mixedTextButtons,
- //imageButtons
- ]
+
+ initComponent: function() {
+ Ext.apply(this, {
+ dockedItems: [
+ topbar,
+ //textButtonShapes,
+ //textButtonColors,
+ //mixedTextButtons,
+ //imageButtons
+ ]
+ });
+
+ ToolbarDemo.views.Actioncard.superclass.initComponent.apply(this, arguments);
+ }
});
Ext.reg('actioncard', ToolbarDemo.views.Actioncard);
@@ -1,18 +1,23 @@
ToolbarDemo.views.Homecard = Ext.extend(Ext.TabPanel, {
title: "home",
iconCls: "home",
- defaults: {
- styleHtmlContent: true
- },
- items: [{
- title: 'TabPanels',
- scroll: 'vertical',
- html: '<p>The TabPanel provides a familiar tabbed interface that enables you to switch between different panels. It comes in two distinct flavours. When the tab bar is top-docked, each tab takes on the appearance of a button with a text label. But if you dock the tab bar to the bottom, then each tab button can be assigned an icon, as well as a text label. The icons are styled with an active and inactive state, which has a native look and feel.</p>'
- },{
- title: 'Toolbars',
- scroll: 'vertical',
- html: '<p>Toolbars can be used as a title bar or as a container for buttons, or you can mix and match both of these functions.</p>'
- }]
+ initComponent: function() {
+ Ext.apply(this, {
+ defaults: {
+ styleHtmlContent: true
+ },
+ items: [{
+ title: 'TabPanels',
+ scroll: 'vertical',
+ html: '<p>The TabPanel provides a familiar tabbed interface that enables you to switch between different panels. It comes in two distinct flavours. When the tab bar is top-docked, each tab takes on the appearance of a button with a text label. But if you dock the tab bar to the bottom, then each tab button can be assigned an icon, as well as a text label. The icons are styled with an active and inactive state, which has a native look and feel.</p>'
+ },{
+ title: 'Toolbars',
+ scroll: 'vertical',
+ html: '<p>Toolbars can be used as a title bar or as a container for buttons, or you can mix and match both of these functions.</p>'
+ }]
+ });
+ ToolbarDemo.views.Homecard.superclass.initComponent.apply(this, arguments);
+ }
});
Ext.reg('homecard', ToolbarDemo.views.Homecard);
@@ -1,11 +1,16 @@
ToolbarDemo.views.Morecard = Ext.extend(Ext.NestedList, {
title: "More",
iconCls: "more",
- store: ToolbarDemo.morestore,
cardSwitchAnimation: 'slide',
- getDetailCard: function(item, parent) {
- var itemData = item.attributes.record.data;
- return itemData.card;
+ initComponent: function() {
+ Ext.apply(this, {
+ store: ToolbarDemo.morestore,
+ getDetailCard: function(item, parent) {
+ var itemData = item.attributes.record.data;
+ return itemData.card;
+ }
+ });
+ ToolbarDemo.views.Morecard.superclass.initComponent.apply(this, arguments);
}
});
@@ -3,10 +3,15 @@ ToolbarDemo.views.Searchcard = Ext.extend(Ext.Panel, {
iconCls: "search",
styleHtmlContent: true,
html: "placeholder text",
- dockedItems: [{
- xtype: "toolbar",
- title: "Search"
- }]
+ initComponent: function() {
+ Ext.apply(this, {
+ dockedItems: [{
+ xtype: "toolbar",
+ title: "Search"
+ }]
+ });
+ ToolbarDemo.views.Searchcard.superclass.initComponent.apply(this, arguments);
+ }
});
Ext.reg('searchcard', ToolbarDemo.views.Searchcard);
@@ -2,29 +2,33 @@ ToolbarDemo.views.Settingscard = Ext.extend(Ext.form.FormPanel, {
title: "settings",
iconCls: "settings",
scroll: "vertical",
- dockedItems: [{
- xtype: "toolbar",
- title: "Settings"
- }],
- items: [
- {
- xtype: 'fieldset',
- title: 'Details',
- items: [{
- xtype: 'textfield',
- name : 'name',
- label: 'Username'
- },{
- xtype: 'passwordfield',
- name : 'password',
- label: 'Password'
+ initComponent: function() {
+ Ext.apply(this, {
+ dockedItems: [{
+ xtype: "toolbar",
+ title: "Settings"
}],
- },{
- xtype: 'button',
- text: 'save',
- ui: 'confirm'
- }
- ]
+ items: [
+ {
+ xtype: 'fieldset',
+ title: 'Details',
+ items: [{
+ xtype: 'textfield',
+ name : 'name',
+ label: 'Username'
+ },{
+ xtype: 'passwordfield',
+ name : 'password',
+ label: 'Password'
+ }],
+ },{
+ xtype: 'button',
+ text: 'save',
+ ui: 'confirm'
+ }]
+ });
+ ToolbarDemo.views.Settingscard.superclass.initComponent.apply(this, arguments);
+ }
});
Ext.reg('settingscard', ToolbarDemo.views.Settingscard);

0 comments on commit 89abf48

Please sign in to comment.