]> git.proxmox.com Git - extjs.git/blame - extjs/templates/executive-dashboard/app/view/main/Main.js
add extjs 6.0.1 sources
[extjs.git] / extjs / templates / executive-dashboard / app / view / main / Main.js
CommitLineData
6527f429
DM
1/**\r
2 * This class is the main view for the application. It is specified in app.js as the\r
3 * "autoCreateViewport" property. That setting automatically applies the "viewport"\r
4 * plugin to promote that instance of this class to the body element.\r
5 */\r
6Ext.define('ExecDashboard.view.main.Main', {\r
7 extend: 'Ext.tab.Panel',\r
8 xtype: 'app-main',\r
9\r
10 requires: [\r
11 'ExecDashboard.view.*'\r
12 ],\r
13\r
14 controller: 'main',\r
15\r
16 viewModel: {\r
17 type: 'main'\r
18 },\r
19\r
20 ui: 'navigation',\r
21 cls: 'exec-menu-navigation',\r
22\r
23 tabBarHeaderPosition: 1,\r
24 titleRotation: 0,\r
25 tabRotation: 0,\r
26\r
27 header: {\r
28 layout: {\r
29 align: 'stretchmax'\r
30 },\r
31 iconCls: 'exec-header-icon',\r
32 title: {\r
33 text: 'MyBiz',\r
34 textAlign: 'center',\r
35 flex: 0,\r
36 minWidth: 160\r
37 },\r
38 tools: [{\r
39 type: 'gear',\r
40 plugins: 'responsive',\r
41 width: 120,\r
42 margin: '0 0 0 0',\r
43 handler: 'onSwitchTool',\r
44 responsiveConfig: {\r
45 'width < 768 && tall': {\r
46 visible: true\r
47 },\r
48 'width >= 768': {\r
49 visible: false\r
50 }\r
51 }\r
52 }]\r
53 },\r
54\r
55 tabBar: {\r
56 flex: 1,\r
57 layout: {\r
58 align: 'stretch',\r
59 overflowHandler: 'none'\r
60 }\r
61 },\r
62\r
63 responsiveConfig: {\r
64 tall: {\r
65 headerPosition: 'top'\r
66 },\r
67 wide: {\r
68 headerPosition: 'left'\r
69 }\r
70 },\r
71\r
72 listeners: {\r
73 tabchange: 'onTabChange'\r
74 },\r
75\r
76 defaults: {\r
77 tabConfig: {\r
78 plugins: 'responsive',\r
79 responsiveConfig: {\r
80 wide: {\r
81 iconAlign: 'left',\r
82 textAlign: 'left',\r
83 flex: 0\r
84 },\r
85 tall: {\r
86 iconAlign: 'top',\r
87 textAlign: 'center',\r
88 flex: 1\r
89 },\r
90 'width < 768 && tall': {\r
91 visible: false\r
92 },\r
93 'width >= 768': {\r
94 visible: true\r
95 }\r
96 }\r
97 }\r
98 },\r
99\r
100 items: [{\r
101 // This page has a hidden tab so we can only get here during initialization. This\r
102 // allows us to avoid rendering an initial activeTab only to change it immediately\r
103 // by routing\r
104 xtype: 'component',\r
105 tabConfig: {\r
106 hidden: true\r
107 }\r
108 },{\r
109 xtype: 'kpi',\r
110 title: 'KPI Overview',\r
111 iconCls: 'exec-kpi-icon'\r
112 },{\r
113 xtype: 'quarterly',\r
114 title: 'Performance',\r
115 iconCls: 'exec-quarterly-icon'\r
116 },{\r
117 xtype: 'profitloss',\r
118 title: 'Profit & Loss',\r
119 iconCls: 'exec-pl-icon'\r
120 },{\r
121 xtype: 'news',\r
122 title: 'Company News',\r
123 iconCls: 'exec-news-icon'\r
124 }],\r
125\r
126 // This object is a config for the popup menu we present on very small form factors.\r
127 // It is used by our controller (MainController).\r
128 assistiveMenu: {\r
129 items: [{\r
130 text: 'KPI Overview',\r
131 height: 50,\r
132 iconCls: 'exec-kpi-icon'\r
133 },{\r
134 text: 'Performance',\r
135 height: 50,\r
136 iconCls: 'exec-quarterly-icon'\r
137 },{\r
138 text: 'Profit & Loss',\r
139 height: 50,\r
140 iconCls: 'exec-pl-icon'\r
141 },{\r
142 text: 'Company News',\r
143 height: 50,\r
144 iconCls: 'exec-news-icon'\r
145 }],\r
146 listeners: {\r
147 click: 'onMenuClick'\r
148 }\r
149 }\r
150});\r