forked from alvinj/FocusDesktopClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
109 lines (81 loc) · 2.34 KB
/
app.js
File metadata and controls
109 lines (81 loc) · 2.34 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Ext.Loader.setConfig({
enabled: true,
paths: {
'Packt.util': 'app/util',
'Packt.model': 'app/model',
'Packt.store': 'app/store',
'Packt.view': 'app/view',
'VP.util': 'app/util/VP'
}
});
Ext.application({
name: 'Focus',
extend: 'Focus.Application',
requires: [
'Ext.menu.Menu',
'Ext.form.Panel',
'Ext.form.Label',
'Ext.form.RadioGroup',
'Ext.data.proxy.Ajax',
'Ext.form.FieldSet',
'Ext.form.field.Hidden',
'Ext.form.field.ComboBox',
'Ext.form.field.File',
'Ext.form.CheckboxGroup',
'Ext.layout.container.Border'
],
views: [
// note: when do i need these?
'MainTabPanel',
'MainViewport'
],
models: [
'Project',
'Task'
],
stores: [
'Projects',
'Tasks'
],
controllers: [
'Main',
'Login',
// 'Projects',
'Tasks'
],
splashscreen: {},
//autoCreateViewport: true,
init: function() {
// Start the mask on the body and get a reference to the mask
splashscreen = Ext.getBody().mask('Loading application', 'splashscreen');
// Add a new class to this mask as we want it to look different from the default.
splashscreen.addCls('splashscreen');
// Insert a new div before the loading icon where we can place our logo.
// Search for the first div tag that contains the '.x-mask-msg' class,
// and add a new div tag as a child (p. 29 of Mastering Ext JS book).
Ext.DomHelper.insertFirst(Ext.query('.x-mask-msg')[0], {
cls: 'x-splash-icon'
});
},
launch: function() {
Ext.tip.QuickTipManager.init();
var task = new Ext.util.DelayedTask(function() {
//Fade out the body mask
splashscreen.fadeOut({
duration: 1000,
remove:true
});
//Fade out the icon and message
splashscreen.next().fadeOut({
duration: 1000,
remove:true,
listeners: {
afteranimate: function(el, startTime, eOpts ){
Ext.widget('login');
}
}
});
});
task.delay(2000);
}
});