]> git.proxmox.com Git - extjs.git/blame - extjs/templates/admin-dashboard/classic/src/view/main/MainContainerWrap.js
add extjs 6.0.1 sources
[extjs.git] / extjs / templates / admin-dashboard / classic / src / view / main / MainContainerWrap.js
CommitLineData
6527f429
DM
1Ext.define('Admin.view.main.MainContainerWrap', {\r
2 extend: 'Ext.container.Container',\r
3 xtype: 'maincontainerwrap',\r
4\r
5 requires : [\r
6 'Ext.layout.container.HBox'\r
7 ],\r
8\r
9 scrollable: 'y',\r
10\r
11 layout: {\r
12 type: 'hbox',\r
13 align: 'stretchmax',\r
14\r
15 // Tell the layout to animate the x/width of the child items.\r
16 animate: true,\r
17 animatePolicy: {\r
18 x: true,\r
19 width: true\r
20 }\r
21 },\r
22\r
23 beforeLayout : function() {\r
24 // We setup some minHeights dynamically to ensure we stretch to fill the height\r
25 // of the viewport minus the top toolbar\r
26\r
27 var me = this,\r
28 height = Ext.Element.getViewportHeight() - 64, // offset by topmost toolbar height\r
29 // We use itemId/getComponent instead of "reference" because the initial\r
30 // layout occurs too early for the reference to be resolved\r
31 navTree = me.getComponent('navigationTreeList');\r
32\r
33 me.minHeight = height;\r
34\r
35 navTree.setStyle({\r
36 'min-height': height + 'px'\r
37 });\r
38\r
39 me.callParent(arguments);\r
40 }\r
41});\r