summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/blogs/HubView.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/blogs/HubView.js')
-rw-r--r--StoneIsland/www/js/lib/blogs/HubView.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/StoneIsland/www/js/lib/blogs/HubView.js b/StoneIsland/www/js/lib/blogs/HubView.js
index 430464b1..ce035c7d 100644
--- a/StoneIsland/www/js/lib/blogs/HubView.js
+++ b/StoneIsland/www/js/lib/blogs/HubView.js
@@ -8,13 +8,28 @@ var HubView = View.extend({
initialize: function(){
this.$content = this.$(".content")
+ this.$loader = this.$(".loader")
},
show: function(){
document.body.className = "hub"
},
- populate: function(){
+ populate: function(data){
+ this.data = data
+ this.$loader.hide()
+ this.$content.empty()
+ this.data.forEach(function(row){
+ var t = this.template.replace({{image}}, row.image.url)
+ .replace({{date}}, row.date)
+ .replace({{code}}, row.code)
+ .replace({{title}}, row.title)
+ .replace({{subtitle}}, row.subtitle)
+ .replace({{link}}, row.link)
+ .replace({{body}}, row.body)
+ this.$content.append(t)
+ }.bind(this))
},
+
}) \ No newline at end of file