summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js')
-rwxr-xr-xStoneIsland/www/js/lib/blogs/BlogView.js7
-rwxr-xr-xStoneIsland/www/js/lib/products/ProductView.js16
2 files changed, 14 insertions, 9 deletions
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js
index ed17e684..6eea977f 100755
--- a/StoneIsland/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/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, "&lt;").replace(/>/g, "&rt;").split('\n').join("<br>")
- $('.fit').html(fit_lines)
- $('.fit').addClass('altText')
- }
}
if (app.store.BackgroundIsGray === "true") {
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 51af09bc..536b4dad 100755
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/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")
@@ -183,7 +184,7 @@ var ProductView = ScrollableView.extend({
console.log( data['DefaultCode10'] )
- title += "<br>EXTREME COMPACTING ON NYLON BASE<br>LIMITED EDITION - NUMBERED 01 TO 100"
+ // title += "<br>EXTREME COMPACTING ON NYLON BASE<br>LIMITED EDITION - NUMBERED 01 TO 100"
if (title.indexOf('<br>') !== -1) {
var title_lines = title.split('<br>').map(function(s){
if (s.indexOf("LIMITED EDITION") !== -1) {
@@ -202,11 +203,22 @@ var ProductView = ScrollableView.extend({
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, "&lt;").replace(/>/g, "&rt;").split('\n').join("<br>")
+ $('.fitFooter').html(fit_lines)
+ $('.fitFooter').show()
+ }
+ else {
+ $('.fitFooter').hide()
+ }
+
this.deferScrollToTop()
},