diff options
Diffstat (limited to 'StoneIsland/www/js/lib/products/ProductView.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ProductView.js | 12 |
1 files changed, 12 insertions, 0 deletions
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() |
