-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
48 lines (45 loc) · 1.44 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
//@require @packageOverrides
Ext.Loader.setConfig({
enabled: true
});
var splashscreen;
Ext.onReady(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.
Ext.DomHelper.insertFirst(Ext.query('.x-mask-msg')[0], {
cls: 'x-splash-icon'
});
});
Ext.application({
views: [
'MyViewport'
],
autoCreateViewport: true,
launch: function() {
// Setup a task to fadeOut the splashscreen
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() {
// Set the body as unmasked after the animation
Ext.getBody().unmask();
}
}
});
});
// Run the fade 500 milliseconds after launch.
task.delay(500);
},
name: 'CustomsReport'
});