-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathApplication.js
More file actions
44 lines (39 loc) · 950 Bytes
/
Application.js
File metadata and controls
44 lines (39 loc) · 950 Bytes
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
Ext.define('AllClasses.Application', {
extend: 'Ext.app.Application',
name: 'AllClasses',
launch: function () {
this.getServerData()
.then(function(response) {
}, function(e) {
console.log(e);
})
},
getServerData: function () {
return new Ext.Promise(function (resolve, reject) {
try {
Ext.Ajax.request({
url: 'resources/modern-all-classes-flatten.json',
success: function(response, opts) {
var data = Ext.decode(response.responseText);
resolve({ data: data });
},
failure: function(response, opts) {
return reject ('server-side failure with status code ' + response.status);
}
});
}
catch(err) {
return reject(err);
}
});
},
onAppUpdate: function () {
Ext.Msg.confirm('Application Update', 'This application has an update, reload?',
function (choice) {
if (choice === 'yes') {
window.location.reload();
}
}
);
}
});