From bf0d6b678d635a9839166a370a6ecc32ccb7b3b5 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 7 Dec 2020 16:48:16 +0100 Subject: limited ed --- StoneIsland/www/css/products.css | 3 ++- StoneIsland/www/index.html | 1 + StoneIsland/www/js/index.js | 2 +- StoneIsland/www/js/lib/blogs/BlogView.js | 2 +- StoneIsland/www/js/lib/products/ProductView.js | 12 ++++++++++++ 5 files changed, 17 insertions(+), 3 deletions(-) (limited to 'StoneIsland') diff --git a/StoneIsland/www/css/products.css b/StoneIsland/www/css/products.css index f32bb9b8..7a3a0961 100755 --- a/StoneIsland/www/css/products.css +++ b/StoneIsland/www/css/products.css @@ -243,7 +243,8 @@ */ .product .fit, -.product .notAvailableInCanada { +.product .notAvailableInCanada, +.product .extraMessage { clear:both; font-size: 0.563rem; letter-spacing:0.5px; diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index 0c81b9a7..e154ee9a 100755 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -349,6 +349,7 @@
Fits Large
Not Available In Canada
+
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 5d0ed9ef..b61e545d 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -156,7 +156,7 @@ var app = (function(){ geo.fetch() var now = +Date.now() - if (now - refresh_time > 60 * 1000) { + if (now - refresh_time > 10 * 1000) { refresh_time = now app.blog.refresh() } diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js index 5263bee5..a6711f3e 100755 --- a/StoneIsland/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/www/js/lib/blogs/BlogView.js @@ -37,7 +37,7 @@ var BlogView = View.extend({ // sdk.env = 'test' - if (sdk.env === 'test') { + if (sdk.env === 'test' || sdk.env === 'development') { app.store = data.store[1] } else { diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 071a804d..31a64273 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -5,6 +5,7 @@ var ProductView = ScrollableView.extend({ events: { "click .fit": "scroll_to_bottom", "click .notAvailableInCanada": "scroll_to_bottom", + "click .extraMessage": "scroll_to_bottom", "change select[name=size]": "select_size", "change select[name=color]": "select_color", // "click .size": "select_size", @@ -33,6 +34,7 @@ var ProductView = ScrollableView.extend({ this.$fit = this.$(".fit") this.$fitHeader = this.$('.fitHeader') this.$notAvailableInCanada = this.$(".notAvailableInCanada") + this.$extraMessage = this.$(".extraMessage") this.$sizing = this.$(".sizing") this.$style = this.$(".style") }, @@ -233,6 +235,16 @@ var ProductView = ScrollableView.extend({ this.$sizing.hide() } + this.$extraMessage.hide() + if (item['C10Attributes'] && item['C10Attributes'].length) { + item['C10Attributes'].forEach(function(attr){ + if (attr['key'] === 'Limited_Edition') { + this.$extraMessage.html(stripHTML( attr['value'] )) + this.$extraMessage.show() + } + }.bind(this)) + } + this.populate_sizes() this.populate_colors() -- cgit v1.2.3-70-g09d2