diff options
Diffstat (limited to 'StoneIsland/www/js/lib/products/ProductView.js')
| -rw-r--r-- | StoneIsland/www/js/lib/products/ProductView.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 4789850a..9d518b11 100644 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -4,12 +4,12 @@ var ProductView = ScrollableView.extend({ el: "#product", events: { - "click .fit": "scroll_to_bottom", - "click .size": "select_size", - "click .color": "select_color", - "click .share": "share", - "click .gallery-left": "gallery_left", - "click .gallery-right": "gallery_right", + "touchstart .fit": "scroll_to_bottom", + "touchstart .size": "select_size", + "touchstart .color": "select_color", + "touchstart .share": "share", + "touchstart .gallery-left": "gallery_left", + "touchstart .gallery-right": "gallery_right", }, initialize: function(){ @@ -21,6 +21,7 @@ var ProductView = ScrollableView.extend({ this.$type = this.$(".type") this.$price = this.$(".price") this.$size = this.$(".size") + this.$share = this.$(".share") this.$color = this.$(".color") this.$body = this.$(".body") this.$fit = this.$(".fit") @@ -202,12 +203,14 @@ var ProductView = ScrollableView.extend({ }, select_size: function(){ + if (this.is_onesize) { return this.select_color() } if (this.item['Sizes'].length == 0) { return } var sizes = Object.keys(this.sizes).map(function(key){ return this.sizes[key] }.bind(this)) - app.selector.select(sizes, function(size){ + + app.selector.select("style", sizes, function(size){ this.size = size.value this.$size.html(size.label) }.bind(this)) @@ -218,7 +221,7 @@ var ProductView = ScrollableView.extend({ var colors = Object.keys(this.colors).map(function(key){ return this.colors[key] }.bind(this)) - app.selector.select(colors, function(color){ + app.selector.select("style", colors, function(color){ this.code = color.code this.$color.html(color.label) }.bind(this)) @@ -267,6 +270,7 @@ var ProductView = ScrollableView.extend({ }, share: function(){ + console.log("share") window.plugins.socialsharing.share( this.item['ModelNames'], null, null, "http://stoneisland.com/") }, |
