]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | Ext.define('KitchenSink.Application', {\r |
2 | extend: 'Ext.app.Application',\r | |
3 | namespace: 'KitchenSink',\r | |
4 | \r | |
5 | requires: [\r | |
6 | 'Ext.app.*',\r | |
7 | 'Ext.state.CookieProvider',\r | |
8 | 'Ext.window.MessageBox',\r | |
9 | 'Ext.tip.QuickTipManager',\r | |
10 | 'KitchenSink.*',\r | |
11 | 'Ext.chart.*'\r | |
12 | ],\r | |
13 | \r | |
14 | controllers: [\r | |
15 | 'Global',\r | |
16 | 'Samples',\r | |
17 | 'Direct'\r | |
18 | ],\r | |
19 | \r | |
20 | init: function() {\r | |
21 | if ('nocss3' in Ext.Object.fromQueryString(location.search)) {\r | |
22 | Ext.supports.CSS3BorderRadius = false;\r | |
23 | Ext.getBody().addCls('x-nbr x-nlg');\r | |
24 | }\r | |
25 | \r | |
26 | Ext.create('KitchenSink.store.Navigation', {\r | |
27 | storeId: 'navigation'\r | |
28 | });\r | |
29 | \r | |
30 | // Set the default route to start the application.\r | |
31 | this.setDefaultToken('all');\r | |
32 | \r | |
33 | Ext.setGlyphFontFamily('Pictos');\r | |
34 | Ext.tip.QuickTipManager.init();\r | |
35 | \r | |
36 | if (!Ext.platformTags.test) {\r | |
37 | Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));\r | |
38 | }\r | |
39 | },\r | |
40 | \r | |
41 | launch: function () {\r | |
42 | if (/[?&]solo\b/.test(location.search)) {\r | |
43 | Ext.create('KitchenSink.view.main.Solo');\r | |
44 | } else {\r | |
45 | Ext.create('KitchenSink.view.main.Main');\r | |
46 | }\r | |
47 | }\r | |
48 | });\r |