summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-12-11 03:33:09 -0600
committerJules Laplace <jules@okfoc.us>2015-12-11 03:33:09 -0600
commit2582c7d92804e44250c9713d79421c8becc61f62 (patch)
treedb7046b3b0d69740247facf3de36f95cb45591a4 /StoneIsland/www/js
parentf7858001fd285d32f67f02313319d0485c6e8466 (diff)
update gallery image when changing product
Diffstat (limited to 'StoneIsland/www/js')
-rwxr-xr-xStoneIsland/www/js/lib/products/CollectionView.js2
-rwxr-xr-xStoneIsland/www/js/lib/products/ProductView.js6
-rwxr-xr-xStoneIsland/www/js/lib/view/View.js2
-rwxr-xr-xStoneIsland/www/js/vendor/util.js2
4 files changed, 6 insertions, 6 deletions
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index 7a020798..798920d1 100755
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -49,7 +49,7 @@ var CollectionView = ScrollableView.extend({
return
}
this.$loader.show()
- sdk.product.collection({
+ sdk.product.all({
gallery_id: app.gallery_id,
success: this.populate.bind(this)
})
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 285e551d..484cd442 100755
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -56,7 +56,7 @@ var ProductView = ScrollableView.extend({
cache: {},
- gallery_prev: function(){
+ gallery_left: function(){
app.product.gallery.gallery.previous()
},
gallery_right: function(){
@@ -250,8 +250,8 @@ var ProductView = ScrollableView.extend({
app.selector.select("style", colors, function(color){
this.code = color.code
this.$color.html(color.label)
-
- // UPDATE GALLERY
+ this.gallery.populate( color.code, this.details['ImageTypes'] )
+ this.gallery_right()
}.bind(this))
},
diff --git a/StoneIsland/www/js/lib/view/View.js b/StoneIsland/www/js/lib/view/View.js
index fe145221..2401df0d 100755
--- a/StoneIsland/www/js/lib/view/View.js
+++ b/StoneIsland/www/js/lib/view/View.js
@@ -59,7 +59,6 @@ var View = (function($, _){
var match = key.match(delegateEventSplitter);
var eventName = match[1], selector = match[2];
method = _.bind(method, this);
- eventName += '.delegateEvents' + this._id;
if (is_mobile) {
if (eventName === 'mouseenter' || eventName === 'mouseleave') {
continue
@@ -68,6 +67,7 @@ var View = (function($, _){
eventName = 'touchstart'
}
}
+ eventName += '.delegateEvents' + this._id;
if (selector === '') {
this.$el.on(eventName, method);
} else {
diff --git a/StoneIsland/www/js/vendor/util.js b/StoneIsland/www/js/vendor/util.js
index 23f55d4c..e09b6ada 100755
--- a/StoneIsland/www/js/vendor/util.js
+++ b/StoneIsland/www/js/vendor/util.js
@@ -143,7 +143,7 @@ if (!Function.prototype.bind) {
}());
// Identify browser based on useragent string
-(function( ua ) {
+var browser = (function( ua ) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||