summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js')
-rw-r--r--StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
index ed46af31..0f03a518 100644
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
@@ -8,13 +8,25 @@ var StoryView = View.extend({
initialize: function(){
this.$content = this.$(".content")
+ this.$loader = this.$(".loader")
+ this.scroller = new IScroll('#story .scroll')
},
show: function(){
document.body.className = "story"
},
-
- 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({{title}}, row.title)
+ .replace({{body}}, row.body)
+ this.$content.append(t)
+ }.bind(this))
},
}) \ No newline at end of file