diff options
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib')
4 files changed, 33 insertions, 17 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js index 5ee7f641..1bd56908 100755 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js @@ -48,7 +48,10 @@ var BlogView = View.extend({ else { app.departments = data.store[0].Departments app.department_id = data.store[0].Departments[0].uri + $("#collections h1").toggleClass("single-dept", data.store[0].Departments.length == 1) app.collection.setCollectionName( data.store[0].Departments[0].text ) + //// demo department for shoes with weird SizeTypeId + // app.department_id = "NKDrtSC" app.collection.loaded = false app.collection.fetch() } diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/push.js b/StoneIsland/platforms/ios/www/js/lib/etc/push.js index 138c4896..da63fdd1 100755 --- a/StoneIsland/platforms/ios/www/js/lib/etc/push.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/push.js @@ -1,7 +1,11 @@ var push = (function(){ - var push = { settings: {} } + var push = { settings: {}, disabled: false } var pushPlugin push.init = function(){ + if (device.platform !== "ios") { + push.disabled = true + return + } pushPlugin = PushNotification.init({ ios: { @@ -50,6 +54,7 @@ var push = (function(){ } } push.subscribe = function(channel, cb){ + if (push.disabled) return push.settings[channel] = true localStorage.setItem("yoox.push_" + channel, "true") var data = { @@ -73,6 +78,7 @@ var push = (function(){ }) } push.unsubscribe = function(channel, cb){ + if (push.disabled) return push.settings[channel] = false localStorage.setItem("yoox.push_" + channel, "false") var data = { diff --git a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js index 671d36b3..3bc2623c 100755 --- a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js @@ -142,7 +142,9 @@ var CollectionView = ScrollableView.extend({ }, showDepartmentSelector: function(){ - this.filterView.filter() + if (this.$("h1").hasClass("single-dept")) { + this.filterView.filter() + } }, firstTouch: { x: 0, y: 0, id: "" }, diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js index 4d370f9f..a757f681 100755 --- a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js @@ -135,23 +135,17 @@ var ProductView = ScrollableView.extend({ var color = this.colors[default_color_id] var color_label = color.label var sizes = this.find_sizes_for_color(default_color_id) + var size = sizes[0] + var size_label = this.sizes[size].label - if (sizes.length) { - var size = sizes[0] - var size_label = this.sizes[size].label + this.gallery.populate( color.code, details['Item']['ImageTypes'] ) - this.gallery.populate( color.code, details['Item']['ImageTypes'] ) + this.color = color + this.size = size - this.color = color - this.size = size - - this.is_onesize = !! this.sizes[1] - - this.$size.show().html(size_label) - } - else { - } + this.is_onesize = !! this.sizes[1] + this.$size.show().html(size_label) if (color_label) { this.$color.html(color_label) } @@ -224,10 +218,21 @@ var ProductView = ScrollableView.extend({ }) details['Item']['ModelSizes'].forEach(function(size){ - var label = SIZE_LOOKUP[ size['Default']['Text'] ] - if (! label && ! size['Default']['Labeled']) { + var label = "" + if (details['Item']['SizeTypeId'] == 412) { // shoes label = size['Default']['Text'] + " " + size['Default']['ClassFamily'] + console.log("shoes?", label) + } + else { // everything else + label = SIZE_LOOKUP[ size['Default']['Text'] ] } + if (! label) { + label = size['Default']['Text'] + if (size['Default']['Labeled']) { + label += " " + size['Default']['ClassFamily'] + } + } + console.log(size) size_lookup[ label ] = size['SizeId'] console.log( label ) sizes[ size['SizeId'] ] = { |
