summaryrefslogtreecommitdiff
path: root/StoneIsland/www
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www')
-rw-r--r--StoneIsland/www/css/products.css3
-rw-r--r--StoneIsland/www/js/lib/_router.js3
-rw-r--r--StoneIsland/www/js/lib/products/ProductView.js11
3 files changed, 12 insertions, 5 deletions
diff --git a/StoneIsland/www/css/products.css b/StoneIsland/www/css/products.css
index 8e97b233..2553cd9b 100644
--- a/StoneIsland/www/css/products.css
+++ b/StoneIsland/www/css/products.css
@@ -17,6 +17,9 @@
#product {
display: none;
}
+#product .style {
+ text-transform: uppercase;
+}
#product.loading #gallery,
#product.loading .content {
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js
index 47f0ec26..c4019571 100644
--- a/StoneIsland/www/js/lib/_router.js
+++ b/StoneIsland/www/js/lib/_router.js
@@ -36,7 +36,7 @@ var SiteRouter = Router.extend({
var fn
for (var route in this.routes) {
fn = this.routes[route]
- if (! this.hasOwnProperty(fn)) {
+ if (! fn in this) {
this[fn] = this.default_view(fn)
}
}
@@ -67,6 +67,7 @@ var SiteRouter = Router.extend({
},
product: function(code){
+ console.log("FUCK YES")
app.view = app.product
app.product.load(code)
app.product.show()
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 9b7912aa..19a1f795 100644
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -20,11 +20,10 @@ var ProductView = ScrollableView.extend({
this.$size = this.$(".size")
this.$color = this.$(".color")
this.$body = this.$(".body")
-
- app.footer.show("ADD TO CART", "< BACK TO SHOPPING")
},
show: function(){
+ app.footer.show("ADD TO CART", "< BACK TO SHOPPING")
document.body.className = "product"
},
hide: function(){
@@ -71,6 +70,7 @@ var ProductView = ScrollableView.extend({
populate: function(data, details){
this.el.className = ""
+
console.log(data, details)
var descriptions = {}
@@ -90,8 +90,11 @@ var ProductView = ScrollableView.extend({
var color = this.colors[default_color_id]
var color_label = color.label
- var size = data['Sizes'][0]
- var size_label = SIZE_LOOKUP[size]
+ var sizes = this.find_sizes_for_color(default_color_id)
+ var size = sizes[0]
+ var size_label = this.sizes[size].label
+
+ // console.log(color, color_label, size, size_label)
this.item = data
this.details = details['Item']