summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-30 22:08:25 -0500
committerJules Laplace <jules@okfoc.us>2015-11-30 22:08:25 -0500
commitb3d98498a562e5ce6dccc333562ed079bcac736d (patch)
tree752aac0d9c091e1c914f17b0bedee5986a18c93c /StoneIsland/www/js
parent8c269d14565f8e56883af0d684de0aefb2f2def1 (diff)
gallery divs
Diffstat (limited to 'StoneIsland/www/js')
-rw-r--r--StoneIsland/www/js/lib/products/CollectionView.js1
-rw-r--r--StoneIsland/www/js/lib/products/GalleryView.js8
2 files changed, 7 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index e0d5bf82..056f2a52 100644
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -65,6 +65,7 @@ var CollectionView = ScrollableView.extend({
this.deferScrollToTop()
}
this.afterFetchCallback && this.afterFetchCallback()
+ app.collection.deferRefresh()
},
append: function(item){
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