app.js
1.16 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
Ext.Loader.setConfig({
enabled:true,
paths: {
'Ext' : 'lib/extjs/src',
'Ext.ux' : 'lib/extjs/examples/ux',
'Samp' : 'lib/sampjs'
}
});
Ext.application({
requires: [
'treps.Constants',
'treps.Messages',
'treps.model.Session',
'treps.LoadMask'
],
name: 'treps',
appFolder: 'app',
controllers: ['Application.Application','Steps.StepsManager','Application.Help.Help'],
autoCreateViewport: true,
constructor: function() {
//Load Ext.direct APIs
Ext.Loader.loadScript({
url: treps.Constants.DIRECT_API,
scope: this,
onLoad: function() {
Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
TREPSAction.getKernelVersion(function(result, event)
{
var appController = treps.app.getController('Application.Application');
if (result && result.success)
{
treps.model.Session.set('kernelVersion',result.status);
appController.setVersion(result.status);
}
}
);
},
onError: function() {
treps.Messages.showError("Server APIs not reachable!");
}
});
this.callParent(arguments);
}
});