diff options
Diffstat (limited to 'StoneIsland/www/js/lib/products/GalleryView.js')
| -rw-r--r-- | StoneIsland/www/js/lib/products/GalleryView.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/products/GalleryView.js b/StoneIsland/www/js/lib/products/GalleryView.js index ea4637eb..b36c5df2 100644 --- a/StoneIsland/www/js/lib/products/GalleryView.js +++ b/StoneIsland/www/js/lib/products/GalleryView.js @@ -31,7 +31,7 @@ var GalleryView = View.extend({ valid_styles[style] = size } }) - Object.keys(valid_styles).forEach(function(style){ + 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)) this.$el.append(t) @@ -62,4 +62,8 @@ var GalleryView = View.extend({ touchend: function(e){ }, -})
\ No newline at end of file +}) + +var YOOX_IMAGE_STYLE_ORDER = "ZZZ d f".split(" ") + +function sort_image_styles (b,a){ return (YOOX_IMAGE_STYLE_ORDER.indexOf(a)) - (YOOX_IMAGE_STYLE_ORDER.indexOf(b)) }
\ No newline at end of file |
