diff options
Diffstat (limited to 'StoneIsland/www/js')
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ProductView.js | 27 |
1 files changed, 17 insertions, 10 deletions
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, "<").replace(/>/g, "&rt;").split('\n').join("<br>") - $('.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, "<").replace(/>/g, "&rt;").split('\n').join("<br>") + this.$sizing.html(sizing_lines) + this.$sizing.show() + } + else { + this.$sizing.hide() + } + this.deferScrollToTop() }, |
