From 6ff0fde713252758132293956b1f048f997cd58f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 3 May 2018 09:16:02 +0200 Subject: last fitslarge thing --- .../UserInterfaceState.xcuserstate | Bin 24354 -> 24336 bytes StoneIsland/www/js/lib/products/ProductView.js | 27 +++++++++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'StoneIsland') diff --git a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate index 1f9fffce..f402a0dd 100644 Binary files a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate and b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 536b4dad..7d782273 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -203,22 +203,29 @@ var ProductView = ScrollableView.extend({ this.$productHeader.toggleClass("wide", title.length > 48) - var fits_large = !!(this.fitLargeCodes[this.code] && app.store.fitsLarge === 'true') - app.product.$fit.toggle( fits_large ) - app.product.$sizing.toggle( fits_large ) + var fits_large = !!(this.fitLargeCodes[this.code]) 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 { + 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() + app.product.$fit.hide() + app.product.$sizing.hide() + } + else { + app.product.$fit.show() + app.product.$sizing.show() + $('.fitFooter').hide() + } + } else { + app.product.$fit.hide() + app.product.$sizing.hide() $('.fitFooter').hide() } - this.deferScrollToTop() }, -- cgit v1.2.3-70-g09d2