From 636b2865bfee44c7ce710673d6ffc6b4fa0a3a36 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 3 May 2018 01:20:55 +0200 Subject: fit footer --- StoneIsland/www/js/lib/products/ProductView.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'StoneIsland/www/js/lib/products/ProductView.js') 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 += "
EXTREME COMPACTING ON NYLON BASE
LIMITED EDITION - NUMBERED 01 TO 100" + // title += "
EXTREME COMPACTING ON NYLON BASE
LIMITED EDITION - NUMBERED 01 TO 100" if (title.indexOf('
') !== -1) { var title_lines = title.split('
').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, "&rt;").split('\n').join("
") + $('.fitFooter').html(fit_lines) + $('.fitFooter').show() + } + else { + $('.fitFooter').hide() + } + this.deferScrollToTop() }, -- cgit v1.2.3-70-g09d2