Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / js / ClassPanel.js
1 Ext.define('Docs.ClassPanel', {
2     extend: 'Ext.tab.Panel',
3
4     id: 'docTabPanel',
5     renderTo: 'api-class',
6
7     style: 'border-color: #bfbfbf;',
8     plain: true,
9
10     // Remember tab scroll position on Webkit
11     listeners: {
12         beforetabchange: function(tabPanel, newCard, oldCard) {
13             oldCard.prevScroll = oldCard.body.getScroll()['top'];
14         },
15         tabchange: function(tabPanel, newCard, oldCard) {
16             if (newCard.prevScroll) {
17                 newCard.body.scrollTo('top', newCard.prevScroll);
18             }
19         },
20         afterrender: function() {
21             Docs.App.resizeWindow();
22         }
23     },
24
25     initComponent: function() {
26         this.height = Ext.get('docContent').getHeight() - 55;
27         this.items = Ext.create('Docs.OverviewPanel');
28         this.callParent(arguments);
29     }
30 });