summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
authorRene Ae <aehtyb@gmail.com>2015-11-20 02:36:20 -0600
committerRene Ae <aehtyb@gmail.com>2015-11-20 02:36:20 -0600
commit19a79cf0d9de0a73af4460f528aad1bde2544532 (patch)
tree3674334ef5bf51c347d37f7fa35d901ec58498c1 /StoneIsland/www/js
parent7d1e7f163acfb4f26c07db241d1cc1b852653324 (diff)
more css on hub and story
Diffstat (limited to 'StoneIsland/www/js')
-rw-r--r--StoneIsland/www/js/index.js1
-rw-r--r--StoneIsland/www/js/lib/blogs/BlogView.js4
-rw-r--r--StoneIsland/www/js/lib/blogs/StoryView.js2
-rw-r--r--StoneIsland/www/js/vendor/loader.js6
4 files changed, 11 insertions, 2 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index dec2d0cd..44146e65 100644
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -30,7 +30,6 @@ var app = (function(){
app.archive = new ArchiveView ()
app.hub = new HubView ()
app.story = new StoryView ()
-
app.cart = new CartView ()
app.intro = new IntroView ()
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js
index 9cb2afbe..19666f8b 100644
--- a/StoneIsland/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/www/js/lib/blogs/BlogView.js
@@ -17,9 +17,12 @@ var BlogView = View.extend({
},
success: function(data){
+
if (this.loaded) return
+
this.loaded = true
this.data = data
+
this.loader.preloadImage(data.archive[0].images[0].uri, function(img){
app.archive.populate(data.archive)
})
@@ -31,6 +34,7 @@ var BlogView = View.extend({
})
data.page.forEach(function(page){
app[page.tag].populate(page)
+
})
app.collection.setCollectionName( data.store[0].collection )
diff --git a/StoneIsland/www/js/lib/blogs/StoryView.js b/StoneIsland/www/js/lib/blogs/StoryView.js
index 88a56392..70ac061f 100644
--- a/StoneIsland/www/js/lib/blogs/StoryView.js
+++ b/StoneIsland/www/js/lib/blogs/StoryView.js
@@ -35,7 +35,7 @@ var StoryView = ScrollableView.extend({
li.dataset.id = row.id
li.innerHTML = row.title
this.sections[row.id] = row
-
+ //console.log("ok");
this.$links.append(li)
this.$content.append(t)
}.bind(this))
diff --git a/StoneIsland/www/js/vendor/loader.js b/StoneIsland/www/js/vendor/loader.js
index cc9644f8..eeb4337e 100644
--- a/StoneIsland/www/js/vendor/loader.js
+++ b/StoneIsland/www/js/vendor/loader.js
@@ -3,7 +3,13 @@ var Loader = Loader || (function(){
this.assets = {};
this.images = [];
this.readyCallback = readyCallback;
+ //
+ // NOTE: there is some sort of race condition happening here.. the 'Story' page has duplicate
+ // title links as 'app.story.populate(data.story)' is being triggered twice in BlogView.js..
+ // i changed 'this.count' below to 1 just to test it and it fixed it for a second.. but then it
+ // quit working again.. so something is awry
this.count = 0
+ //
this.view = view
this.loaded = false
}