-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move all complex types from config to initComponent().
- Loading branch information
Showing
6 changed files
with
94 additions
and
62 deletions.
There are no files selected for viewing
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,16 +1,22 @@ | |||
ToolbarDemo.views.Viewport = Ext.extend(Ext.TabPanel, { | ToolbarDemo.views.Viewport = Ext.extend(Ext.TabPanel, { | ||
fullscreen: true, | fullscreen: true, | ||
tabBar: { |
|
||
dock: 'bottom', | initComponent: function() { | ||
layout: { | Ext.apply(this, { | ||
pack: 'center' | tabBar: { | ||
} | dock: 'bottom', | ||
}, | layout: { | ||
items: [ | pack: 'center' | ||
{ xtype: 'homecard', id: 'home' }, | } | ||
{ xtype: 'searchcard' }, | }, | ||
{ xtype: 'actioncard' }, | items: [ | ||
{ xtype: 'settingscard' }, | { xtype: 'homecard', id: 'home' }, | ||
{ xtype: 'morecard' } | { xtype: 'searchcard' }, | ||
] | { xtype: 'actioncard' }, | ||
{ xtype: 'settingscard' }, | |||
{ xtype: 'morecard' } | |||
] | |||
}); | |||
ToolbarDemo.views.Viewport.superclass.initComponent.apply(this, arguments); | |||
} | |||
}); | }); |
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
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,18 +1,23 @@ | |||
ToolbarDemo.views.Homecard = Ext.extend(Ext.TabPanel, { | ToolbarDemo.views.Homecard = Ext.extend(Ext.TabPanel, { | ||
title: "home", | title: "home", | ||
iconCls: "home", | iconCls: "home", | ||
defaults: { | initComponent: function() { | ||
styleHtmlContent: true | Ext.apply(this, { | ||
}, | defaults: { | ||
items: [{ | styleHtmlContent: true | ||
title: 'TabPanels', | }, | ||
scroll: 'vertical', | items: [{ | ||
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: 'TabPanels', | ||
},{ | scroll: 'vertical', | ||
title: 'Toolbars', | 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>' | ||
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>' | 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); | Ext.reg('homecard', ToolbarDemo.views.Homecard); |
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
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
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