]>
Commit | Line | Data |
---|---|---|
c4685c84 TL |
1 | //<debug> |
2 | Ext.Loader.setPath({ | |
3 | 'Ext': '../../src' | |
4 | }); | |
5 | //</debug> | |
6 | ||
7 | Ext.application({ | |
8 | name: 'TouchTomatoes', | |
9 | ||
10 | requires: ['Ext.device.Storage','Ext.Menu', 'TouchTomatoes.components.MenuButton'], | |
11 | controllers: ['TouchTomatoes.controller.Main'], | |
12 | views: ['TouchTomatoes.view.Main', 'TouchTomatoes.view.WelcomeOverlay'], | |
13 | ||
14 | launch: function() { | |
15 | Ext.getBody().removeCls('loading'); | |
16 | Ext.create('TouchTomatoes.view.Main'); | |
17 | ||
18 | if (Ext.device.Storage.getItem('isFirstTime') !== "false") { | |
19 | Ext.device.Storage.setItem('isFirstTime', false); | |
20 | ||
21 | var overlay = Ext.create('TouchTomatoes.view.WelcomeOverlay'); | |
22 | Ext.Viewport.add(overlay); | |
23 | overlay.show(); | |
24 | } | |
25 | ||
26 | var menu = Ext.create("Ext.Menu", { | |
27 | defaults: { | |
28 | xtype: "menubutton" | |
29 | }, | |
30 | width: '80%', | |
31 | scrollable: 'vertical', | |
32 | items: [ | |
33 | { | |
34 | text: 'Opening', | |
35 | iconCls: 'time', | |
36 | menu:"opening" | |
37 | }, | |
38 | { | |
39 | text: 'Theatres', | |
40 | iconCls: 'locate', | |
41 | menu: "theatres" | |
42 | }, | |
43 | { | |
44 | text: 'Upcoming', | |
45 | iconCls: 'team', | |
46 | menu:"upcoming" | |
47 | }, | |
48 | { | |
49 | text: 'Top', | |
50 | iconCls: 'bank', | |
51 | menu:'top' | |
52 | }, | |
53 | { | |
54 | text: 'Search', | |
55 | iconCls: 'search', | |
56 | menu:"search" | |
57 | } | |
58 | ] | |
59 | }); | |
60 | ||
61 | Ext.Viewport.setMenu(menu, { | |
62 | side: 'left', | |
63 | reveal: true | |
64 | }); | |
65 | } | |
66 | }); | |
67 |