summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/blogs/BlogView.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/blogs/BlogView.js')
-rw-r--r--StoneIsland/www/js/lib/blogs/BlogView.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js
index 3ea35418..ddfff9e6 100644
--- a/StoneIsland/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/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