From 20d3f4537a578c581285ae8c90da2af9f929be66 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 13 Jul 2019 23:41:11 +0200 Subject: many changes to forms. starting to add labels --- StoneIsland/www/js/lib/products/CollectionView.js | 2 ++ StoneIsland/www/js/lib/products/Selector.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'StoneIsland/www/js/lib/products') diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js index 4674fc18..b7af235a 100755 --- a/StoneIsland/www/js/lib/products/CollectionView.js +++ b/StoneIsland/www/js/lib/products/CollectionView.js @@ -196,6 +196,7 @@ var CollectionView = ScrollableView.extend({ this.items[ item['Code8'] ] = item var t = this.template.replace(/{{image}}/, sdk.image(item['DefaultCode10'], is_single_product ? '13_f' : '11_f')) .replace(/{{code8}}/, item['Code8']) + .replace(/{{title}}/, stonewash(item['ModelNames'])) var $t = $(t) if (app.store.ShowProductNameOnCollectionPage) { var $title = $("") @@ -217,6 +218,7 @@ var CollectionView = ScrollableView.extend({ setCollectionName: function(name){ this.collectionName = name this.$title.html(this.collectionName) + this.$title.attr('aria-label', stonewash(this.collectionName)) }, // filter by department diff --git a/StoneIsland/www/js/lib/products/Selector.js b/StoneIsland/www/js/lib/products/Selector.js index 9c1109f6..e3376a4d 100755 --- a/StoneIsland/www/js/lib/products/Selector.js +++ b/StoneIsland/www/js/lib/products/Selector.js @@ -21,7 +21,7 @@ var Selector = View.extend({ options.forEach(function(opt){ this.lookup[String(opt.id)] = opt var t = this.template.replace(/{{id}}/, opt.id) - .replace(/{{label}}/, opt.label) + .replace(/{{label}}/g, opt.label) this.$options.append(t) }.bind(this)) this.$el.show() -- cgit v1.2.3-70-g09d2