diff options
Diffstat (limited to 'StoneIsland/www/js')
| -rwxr-xr-x | StoneIsland/www/js/lib/blogs/BlogView.js | 3 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/etc/push.js | 8 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/products/CollectionView.js | 4 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ProductView.js | 19 |
4 files changed, 29 insertions, 5 deletions
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js index 5ee7f641..1bd56908 100755 --- a/StoneIsland/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/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/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js index 138c4896..da63fdd1 100755 --- a/StoneIsland/www/js/lib/etc/push.js +++ b/StoneIsland/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/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js index 671d36b3..3bc2623c 100755 --- a/StoneIsland/www/js/lib/products/CollectionView.js +++ b/StoneIsland/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/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 81ad536d..4ae77c1f 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -118,7 +118,9 @@ var ProductView = ScrollableView.extend({ var title = name_partz.join(' ') var type = title_case( data['MicroCategory'] ) var price = "$" + data['DiscountedPrice'] + ".00" - var body = descriptions['Details'] + " " + descriptions['EditorialDescription'] + var details = descriptions['Details'] || "" + var editorial = descriptions['EditorialDescription'] || "" + var body = details + " " + editorial // body = body.replace(/<br>/g, "<br><br>").replace(/(<br>)+$/, "") var default_color_id = this.populate_selectors(data, details) @@ -218,10 +220,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'] ] = { |
