blob: d66ea1cf330e0a70b0677672787f669bea31862d (
plain)
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
|
var IndexView = View.extend({
events: {
},
action: "/api/index",
initialize: function(opt){
// opt.parent = parent
this.hootbox = new HootBox ({ parent: this })
this.threadbox = new ThreadBox ({ parent: this, latest: true })
this.lastlog = new LastLog ({ parent: this })
this.load()
},
load: function(){
$.get(this.action, this.populate.bind(this))
},
populate: function(data){
this.hootbox.load(data.hootbox)
this.threadbox.load(data)
this.lastlog.load(data.lastlog)
},
success: function(){
window.location.href = "/index"
},
})
|