summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/views/index/index.js
blob: cb648fa870659d123f8047410a5bf5b50d7ec553 (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
var IndexView = View.extend({

  events: {
  },
  
  action: "/api/index",
  
  initialize: function(opt){
    // opt.parent = parent
    this.hootbox = new HootboxView ({ parent: this })
    this.load()
  },
  
  load: function(){
    $.get(this.action, this.populate.bind(this))
  },
  
  populate: function(data){
    this.hootbox.load(data.hootbox)
  },
  
  success: function(){
    window.location.href = "/index"
  },

})