summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/blogs/BlogView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-12-02 21:00:56 -0500
committerJules Laplace <jules@okfoc.us>2015-12-02 21:01:09 -0500
commitafe471dd05516695ed44eccbe617dae7af4eddbd (patch)
treed69d268553eff8d21538761d63814140c9ff7a14 /StoneIsland/www/js/lib/blogs/BlogView.js
parent393dc6eaf8d5a119c9cf71f1f5dac44abf70db59 (diff)
populate archive..
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