From 393dc6eaf8d5a119c9cf71f1f5dac44abf70db59 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 2 Dec 2015 21:00:30 -0500 Subject: build.. --- StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js index 3ea35418..ddfff9e6 100644 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js @@ -10,7 +10,7 @@ var BlogView = View.extend({ fetch: function(){ $.ajax({ method: "GET", - url: "http://stone.sup.land/db.json", + url: sdk.env == 'test' ? '/db.json' : "http://stone.sup.land/db.json", success: this.success.bind(this), cache: true, }) @@ -21,11 +21,10 @@ var BlogView = View.extend({ if (this.loaded) return this.loaded = true - this.data = data + this.data = data = typeof data == "string" ? JSON.parse(data) : data + + app.archive.populate(data.archive) - this.loader.preloadImage(data.archive[0].images[0].uri, function(img){ - app.archive.populate(data.archive) - }) this.loader.preloadImage(data.hub[0].image[0].uri, function(img){ app.hub.populate(data.hub) }) @@ -54,7 +53,7 @@ var BlogView = View.extend({ app.gallery_id = data.store[0].CollectionId - app.collection.fetch() + // app.collection.fetch() }, }) \ No newline at end of file -- cgit v1.2.3-70-g09d2