summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/products/GalleryView.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-07-12 18:59:23 +0200
committerJules Laplace <julescarbon@gmail.com>2019-07-12 18:59:23 +0200
commit90a550943188af41dfe8e82ddc386f56436c5a7e (patch)
treedb2bcea0ed446a3b16cda9e8b5642e9ba2f96870 /StoneIsland/www/js/lib/products/GalleryView.js
parentde4c08d90cfeb96c416791e8210cfdba8c7aba44 (diff)
more ARIA tags. make headers 48px
Diffstat (limited to 'StoneIsland/www/js/lib/products/GalleryView.js')
-rwxr-xr-xStoneIsland/www/js/lib/products/GalleryView.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/products/GalleryView.js b/StoneIsland/www/js/lib/products/GalleryView.js
index 0acd48c5..9c012598 100755
--- a/StoneIsland/www/js/lib/products/GalleryView.js
+++ b/StoneIsland/www/js/lib/products/GalleryView.js
@@ -39,7 +39,9 @@ var GalleryView = View.extend({
Object.keys(valid_styles).sort(sort_image_styles).forEach(function(style){
var id = valid_styles[style] + "_" + style
- var t = this.template.replace(/{{image}}/, sdk.image(code, id))
+ var t = this.template
+ .replace(/{{image}}/, sdk.image(code, id))
+ .replace(/{{alt}}/, YOOX_IMAGE_STYLE_LABELS[style])
this.$el.append(t)
}.bind(this))
@@ -79,5 +81,8 @@ var GalleryView = View.extend({
})
var YOOX_IMAGE_STYLE_ORDER = "ZZZ f r d e a b c g l".split(" ")
-
+var YOOX_IMAGE_STYLE_LABELS = {
+ f: 'Front view',
+ r: 'Rear view',
+}
function sort_image_styles (b,a){ return (YOOX_IMAGE_STYLE_ORDER.indexOf(b)) - (YOOX_IMAGE_STYLE_ORDER.indexOf(a)) } \ No newline at end of file