diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-19 21:13:27 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-19 21:13:27 -0500 |
| commit | 6500cf422563eac86341a1fbc937e5554a66ee78 (patch) | |
| tree | b5a1a0157539f38bb269dfa2dbe7fab23e8b8b4f /StoneIsland/www/js | |
| parent | 4c3febe100ee89726469d3823718aad69d00dfd4 (diff) | |
cms sets whether store is closed
Diffstat (limited to 'StoneIsland/www/js')
| -rw-r--r-- | StoneIsland/www/js/lib/blogs/BlogView.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/ClosedStoreView.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/CollectionView.js | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js index 50313aa8..4f888e8d 100644 --- a/StoneIsland/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/www/js/lib/blogs/BlogView.js @@ -31,7 +31,7 @@ var BlogView = View.extend({ data.page.forEach(function(page){ app[page.tag].populate(page) }) - if (data.store[0].StoreIsOpen !== "True") { + if (data.store[0].StoreIsOpen !== "true") { app.closed.populate(data.store[0].ClosedStoreImages) } }, diff --git a/StoneIsland/www/js/lib/products/ClosedStoreView.js b/StoneIsland/www/js/lib/products/ClosedStoreView.js index c4e929b3..ec951a4c 100644 --- a/StoneIsland/www/js/lib/products/ClosedStoreView.js +++ b/StoneIsland/www/js/lib/products/ClosedStoreView.js @@ -1,6 +1,8 @@ var ClosedStoreView = View.extend({ el: "#closed", + + storeIsClosed: false, events: { "click .website_link": "website_link", @@ -35,6 +37,8 @@ var ClosedStoreView = View.extend({ }, populate: function(data){ + console.log("OPULATEP") + this.storeIsClosed = true this.images = data.map(function(img){ return img.uri }) }, diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js index 571bb4fc..03ff5451 100644 --- a/StoneIsland/www/js/lib/products/CollectionView.js +++ b/StoneIsland/www/js/lib/products/CollectionView.js @@ -22,8 +22,11 @@ var CollectionView = ScrollableView.extend({ this.scroller = new IScroll('#collection', app.iscroll_options) this.filterView = new CategoryFilter ({ parent: this }) }, - + show: function(){ + if (app.closed.storeIsClosed) { + return app.closed.show() + } app.footer.show("FILTER") document.body.className = "collection" if (this.loaded) { |
