-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
55 lines (43 loc) · 1.5 KB
/
app.js
File metadata and controls
55 lines (43 loc) · 1.5 KB
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
//<debug>
Ext.Loader.setPath({
'Ext': 'sdk/src'
});
//</debug>
Ext.application({
name: 'OurOrder',
requires: [
'Ext.MessageBox'
],
views: ['PersonListContainer','PersonList','OrderItemListContainer','OrderItemList','ToppingListContainer','ToppingList'],
stores: ['Person', 'Order', 'OrderItem', 'Topping'],
controllers: ['Person', 'OrderItem', 'Topping'],
models: ["Person", "Order", "OrderItem", "Topping"],
icon: {
57: 'resources/icons/Icon.png',
72: 'resources/icons/Icon~ipad.png',
114: 'resources/icons/Icon@2x.png',
144: 'resources/icons/Icon~ipad@2x.png'
},
phoneStartupScreen: 'resources/loading/Homescreen.jpg',
tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg',
launch: function() {
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
// load stores
Ext.getStore("Person").load();
Ext.getStore("Order").load();
Ext.getStore("OrderItem").load();
Ext.getStore("Topping").load();
// Initialize the PersonListContainer view
Ext.Viewport.add({xtype:'personlistcontainer'},{xtype:'orderitemlistcontainer'},{xtype:'toppinglistcontainer'});
},
onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
function() {
window.location.reload();
}
);
}
});