From aa14cf56259f7e7ffb4c18af013cdfcfc56953fa Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 10 May 2018 16:45:35 +0200 Subject: sizing footer. phook script --- StoneIsland/www/js/lib/products/ProductView.js | 27 ++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'StoneIsland/www/js') diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 59726384..66554ce7 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -26,7 +26,7 @@ var ProductView = ScrollableView.extend({ this.$color = this.$(".color") this.$body = this.$(".body") this.$fit = this.$(".fit") - this.$fitFooter = this.$('.fitFooter') + this.$fitHeader = this.$('.fitHeader') this.$notAvailableInCanada = this.$(".notAvailableInCanada") this.$sizing = this.$(".sizing") this.$style = this.$(".style") @@ -211,20 +211,27 @@ var ProductView = ScrollableView.extend({ if (fits_large) { 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() + this.$fitHeader.html(fit_lines) + this.$fitHeader.show() } else { - $('.fitFooter').hide() + this.$fitHeader.hide() } - app.product.$fit.show() - app.product.$sizing.show() + this.$fit.show() } else { - $('.fitFooter').hide() - app.product.$fit.hide() - app.product.$sizing.hide() + this.$fitFooter.hide() + this.$fit.hide() } - + + if (app.store.SizingFooter === 'use_alt_text' && (app.store.SizingFooterText || "").length) { + var sizing_lines = app.store.SizingFooterText.replace(//g, "&rt;").split('\n').join("
") + this.$sizing.html(sizing_lines) + this.$sizing.show() + } + else { + this.$sizing.hide() + } + this.deferScrollToTop() }, -- cgit v1.2.3-70-g09d2