summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/products/ProductView.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-03 01:20:55 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-03 01:20:55 +0200
commit636b2865bfee44c7ce710673d6ffc6b4fa0a3a36 (patch)
treee702a8dec2c75d342c9d8b1d838c9cf2f4cc167b /StoneIsland/www/js/lib/products/ProductView.js
parent7fd9be7dea894fe286b2d6a8d385e8c4c88878cb (diff)
fit footer
Diffstat (limited to 'StoneIsland/www/js/lib/products/ProductView.js')
-rwxr-xr-xStoneIsland/www/js/lib/products/ProductView.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 51af09bc..536b4dad 100755
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -26,6 +26,7 @@ var ProductView = ScrollableView.extend({
this.$color = this.$(".color")
this.$body = this.$(".body")
this.$fit = this.$(".fit")
+ this.$fitFooter = this.$('.fitFooter')
this.$notAvailableInCanada = this.$(".notAvailableInCanada")
this.$sizing = this.$(".sizing")
this.$style = this.$(".style")
@@ -183,7 +184,7 @@ var ProductView = ScrollableView.extend({
console.log( data['DefaultCode10'] )
- title += "<br>EXTREME COMPACTING ON NYLON BASE<br>LIMITED EDITION - NUMBERED 01 TO 100"
+ // title += "<br>EXTREME COMPACTING ON NYLON BASE<br>LIMITED EDITION - NUMBERED 01 TO 100"
if (title.indexOf('<br>') !== -1) {
var title_lines = title.split('<br>').map(function(s){
if (s.indexOf("LIMITED EDITION") !== -1) {
@@ -202,11 +203,22 @@ var ProductView = ScrollableView.extend({
this.$productHeader.toggleClass("wide", title.length > 48)
- var fits_large = !! this.fitLargeCodes[this.code]
+ var fits_large = !!(this.fitLargeCodes[this.code] && app.store.fitsLarge === 'true')
app.product.$fit.toggle( fits_large )
app.product.$sizing.toggle( fits_large )
this.showFooter()
+
+ console.log(app.store.FitsLarge, app.store.fitsLargeText)
+ if (app.store.FitsLarge === 'use_alt_text' && (app.store.FitsLargeText || "").length) {
+ var fit_lines = app.store.FitsLargeText.replace(/</g, "&lt;").replace(/>/g, "&rt;").split('\n').join("<br>")
+ $('.fitFooter').html(fit_lines)
+ $('.fitFooter').show()
+ }
+ else {
+ $('.fitFooter').hide()
+ }
+
this.deferScrollToTop()
},