From 612561818f907f0f9988247c82ec158ba4494986 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 24 Nov 2015 20:57:41 -0500 Subject: build --- StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js index 34e8b109..051ef0c9 100644 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js @@ -1,4 +1,4 @@ -var ArchiveView = View.extend({ +var ArchiveView = ScrollableView.extend({ el: "#archive", template: $("#archive .template").html(), @@ -9,10 +9,12 @@ var ArchiveView = View.extend({ initialize: function(){ this.$content = this.$(".content") this.$loader = this.$(".loader") - this.scroller = new IScroll('#archive .scroll') + this.scroller = new IScroll('#archive', app.iscroll_options) }, show: function(){ + this.deferScrollToTop() + app.footer.hide() document.body.className = "archive" }, @@ -20,14 +22,14 @@ var ArchiveView = View.extend({ this.data = data this.$loader.hide() this.$content.empty() + + // id title images[ uri label code caption ] this.data.forEach(function(row){ - var t = this.template.replace(/{{image}}/, row.image.url) + var t = this.template.replace(/{{image}}/, row.images[0].uri) .replace(/{{code}}/, row.code) .replace(/{{title}}/, row.title) - .replace(/{{body}}/, row.body) this.$content.append(t) }.bind(this)) }, - }) \ No newline at end of file -- cgit v1.2.3-70-g09d2