From e78cb0041d0d5a925d54adf392fb391ebf04d861 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 3 May 2018 01:30:35 +0200 Subject: build --- .../platforms/ios/www/js/lib/blogs/BlogView.js | 7 ------- .../ios/www/js/lib/products/ProductView.js | 23 +++++++++++++++++----- 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'StoneIsland/platforms/ios/www/js/lib') diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js index ed17e684..6eea977f 100755 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js @@ -92,18 +92,11 @@ var BlogView = View.extend({ console.log(app.store.StoreStatus) - console.log(app.store.FitsLarge, app.store.fitsLargeText) app.product.fitLargeCodes = {} if (app.store.FittingCodes.length) { app.store.FittingCodes.split("\n").forEach(function(code){ app.product.fitLargeCodes[code] = true }) - 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("
") - $('.fit').html(fit_lines) - $('.fit').addClass('altText') - } } if (app.store.BackgroundIsGray === "true") { diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js index c22c7962..536b4dad 100755 --- a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js +++ b/StoneIsland/platforms/ios/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") @@ -182,15 +183,16 @@ var ProductView = ScrollableView.extend({ this.code = data['DefaultCode10'] 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")) { + if (s.indexOf("LIMITED EDITION") !== -1) { return "" + s + "" } return s - }) - title = title_lines.join('

') + }.bind(this)) + title = title_lines.join('

') + '
' } this.$title.html(title) this.$type.html(type) @@ -201,11 +203,22 @@ title += "
EXTREME COMPACTING ON NYLON BASE
LIMITED EDITION - NUMBERED 01 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