-
Notifications
You must be signed in to change notification settings - Fork 22
/
app.js
60 lines (46 loc) · 944 Bytes
/
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
49
50
51
52
53
54
55
56
57
58
59
define(function(require) {
var $ = require('jquery'),
monster = require('monster');
var app = {
name: 'numbers',
css: [ 'app' ],
i18n: {
'en-US': { customCss: false },
'fr-FR': { customCss: false },
'ru-RU': { customCss: false }
},
requests: {
},
subscribe: {
},
load: function(callback) {
var self = this;
self.initApp(function() {
callback && callback(self);
});
},
initApp: function(callback) {
var self = this;
monster.pub('auth.initApp', {
app: self,
callback: callback
});
},
render: function(parent) {
var self = this,
parent = parent || $('#monster_content');
var numberManager = $(self.getTemplate({
name: 'app'
}));
monster.pub('common.numbers.render', {
container: numberManager,
callbackAfterRender: function(numberControl) {
parent
.empty()
.append(numberControl);
}
});
}
};
return app;
});