summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/views/index/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/lib/views/index/index.js')
-rw-r--r--public/assets/js/lib/views/index/index.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/public/assets/js/lib/views/index/index.js b/public/assets/js/lib/views/index/index.js
index 095909d..cb648fa 100644
--- a/public/assets/js/lib/views/index/index.js
+++ b/public/assets/js/lib/views/index/index.js
@@ -3,8 +3,20 @@ 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(){