-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
63 lines (48 loc) · 1.59 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Ext.Loader.setPath({
'Ext': 'sdk/src',
'Ext.io': 'lib/io/src/io',
'Ext.cf': 'lib/io/src/cf'
});
/*
IO stores used:
rooms - group
mychats - user list of rooms and user chats that I have
room-<name> - group
p-<uid>-<uid> - group user to user chat room
*/
Ext.application({
name: 'ioExamples',
requires: [
'Ext.MessageBox'
, 'Ext.io.Io' /* requires base Io singlton so that we can call Ext.io.init(); FIXME: simplify for the release. */
, 'Ext.io.data.Proxy'
, 'Ext.Map'
],
views: ['Main', "Home", "Rooms", "People", "Location"],
models: ['Person', "ChatMessage", "Room", "Location"],
stores: ['People'],
controllers: ['Main', "Messaging", "Rooms", "Location"],
icon: {
57: 'resources/icons/Icon.png',
72: 'resources/icons/Icon~ipad.png',
114: 'resources/icons/[email protected]',
144: 'resources/icons/[email protected]'
},
phoneStartupScreen: 'resources/loading/Homescreen.jpg',
tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg',
launch: function() {
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
// Initialize the main view
Ext.Viewport.add(Ext.create('ioExamples.view.Main'));
},
onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
function() {
window.location.reload();
}
);
}
});