diff options
Diffstat (limited to 'StoneIsland/www/js/lib/blogs')
| -rw-r--r-- | StoneIsland/www/js/lib/blogs/BlogView.js | 1 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/blogs/FaqView.js | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js index 59cf25b2..357698f5 100644 --- a/StoneIsland/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/www/js/lib/blogs/BlogView.js @@ -28,6 +28,7 @@ var BlogView = View.extend({ this.loader.preloadImage(data.story[0].image.uri, function(img){ app.story.populate(data.story) }) + app.faq.populate(data.page[0]) }, })
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/blogs/FaqView.js b/StoneIsland/www/js/lib/blogs/FaqView.js new file mode 100644 index 00000000..bce83d88 --- /dev/null +++ b/StoneIsland/www/js/lib/blogs/FaqView.js @@ -0,0 +1,23 @@ +var FaqView = ScrollableView.extend({ + + el: "#faq", + + events: { + }, + + initialize: function(){ + this.$content = this.$(".content") + this.$loader = this.$(".loader") + this.scroller = new IScroll('#faq', app.iscroll_optionsx) + }, + + show: function(){ + this.deferScrollToTop() + document.body.className = "faq" + }, + + populate: function(data){ + this.$content.html(data.body.replace(/\n/g, "<br>")) + } + +})
\ No newline at end of file |
