diff options
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib')
4 files changed, 19 insertions, 9 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/_router.js b/StoneIsland/platforms/ios/www/js/lib/_router.js index 5cd09d6c..b1fa1c97 100755 --- a/StoneIsland/platforms/ios/www/js/lib/_router.js +++ b/StoneIsland/platforms/ios/www/js/lib/_router.js @@ -86,7 +86,6 @@ var SiteRouter = Router.extend({ app.view = app[name] } app.header.set_back( !! app.view.back ) - console.log("showing now") app.view.show() }.bind(this) return fn diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js index 49c05ff6..dae7f98d 100755 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js @@ -4,7 +4,7 @@ var HubView = ScrollableView.extend({ template: $("#hub .template").html(), events: { - "click .share": "content-share", + "click .content-share": "share", "click .store": "store_link", "click .gallery-left": "gallery_left", "click .gallery-right": "gallery_right", @@ -106,8 +106,10 @@ var HubView = ScrollableView.extend({ this.galleries[id].next() }, - share: function(){ - window.plugins.socialsharing.share( this.item['ModelNames'], null, null, "http://stoneisland.com/") + share: function(e){ + var title = $(e.currentTarget).parent().find(".title").text() + console.log("share", title) + window.plugins.socialsharing.share(title, null, null, "http://stoneisland.com/" ) }, })
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/push.js b/StoneIsland/platforms/ios/www/js/lib/etc/push.js index 4e771b62..5585ba71 100755 --- a/StoneIsland/platforms/ios/www/js/lib/etc/push.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/push.js @@ -17,7 +17,7 @@ var push = (function(){ push.settings.store = localStorage.getItem("yoox.push_store") == "true" if ( ! push.settings.requested ) { - localStorage.setItem("yoox.push_" + channel, "true") + localStorage.setItem("yoox.push_requested", "true") push.subscribe("hub", function(){ push.subscribe("store") }) diff --git a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js index 798920d1..53e99390 100755 --- a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js @@ -26,8 +26,9 @@ var CollectionView = ScrollableView.extend({ show: function(){ if (app.closed.storeIsClosed) { - // (! this.storeOpenDate || moment().diff(this.storeOpenDate) > 0 ) ) { - return app.closed.show() + if (! app.closed.storeOpenDate || app.closed.storeOpenDate.diff() > 0) { + return app.closed.show() + } } app.footer.show("FILTER") document.body.className = "collection" @@ -35,7 +36,9 @@ var CollectionView = ScrollableView.extend({ console.log("collection this loaded") return this.populate(this.data) } - // this.fetch() + else { + this.fetch() + } }, save: function(){ @@ -49,11 +52,17 @@ var CollectionView = ScrollableView.extend({ return } this.$loader.show() - sdk.product.all({ + console.log("fetching", app.gallery_id) + sdk.product.collection({ gallery_id: app.gallery_id, success: this.populate.bind(this) }) }, + + refresh: function(){ + this.loaded = false + this.fetch() + }, populate: function(data){ if (this.loaded && ! data) { |
