diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-10 16:45:35 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-10 16:45:35 +0200 |
| commit | aa14cf56259f7e7ffb4c18af013cdfcfc56953fa (patch) | |
| tree | e5b90f703afde73c1ba485443c929b9cf8bc704c /StoneIsland/www/js | |
| parent | c53933dbbe11ebc0f3d9cb3ce9d2e5d0f6ebf7bc (diff) | |
sizing footer. phook script
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() }, |
