summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/cart
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/cart')
-rw-r--r--StoneIsland/www/js/lib/cart/CartConfirm.js11
-rw-r--r--StoneIsland/www/js/lib/cart/CartPayment.js12
-rw-r--r--StoneIsland/www/js/lib/cart/CartShipping.js13
-rw-r--r--StoneIsland/www/js/lib/cart/CartSummary.js11
-rw-r--r--StoneIsland/www/js/lib/cart/CartThanks.js10
-rw-r--r--StoneIsland/www/js/lib/cart/CartView.js17
6 files changed, 71 insertions, 3 deletions
diff --git a/StoneIsland/www/js/lib/cart/CartConfirm.js b/StoneIsland/www/js/lib/cart/CartConfirm.js
index cf01a67e..4bce4db3 100644
--- a/StoneIsland/www/js/lib/cart/CartConfirm.js
+++ b/StoneIsland/www/js/lib/cart/CartConfirm.js
@@ -7,5 +7,16 @@ var CartConfirm = View.extend({
initialize: function(){
},
+
+ show: function(){
+ app.cart.el.className = "confirm"
+ app.footer.show("PLACE ORDER", "CANCEL")
+ },
+
+ save: function(){
+ },
+
+ cancel: function(){
+ },
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js
index 69cbf81b..b70e7f73 100644
--- a/StoneIsland/www/js/lib/cart/CartPayment.js
+++ b/StoneIsland/www/js/lib/cart/CartPayment.js
@@ -6,12 +6,22 @@ var CartPayment = View.extend({
},
initialize: function(){
+ this.$form = this.$("form")
+ this.$msg = this.$(".msg")
this.address = new AddressView ({ parent: this })
this.cc = new CreditCardView ({ parent: this })
},
show: function(){
- document.body.className = "cart_payment"
+ app.cart.el.className = "payment"
+ app.footer.show("CONFIRM >", "CANCEL")
},
+
+ save: function(){
+ },
+
+ cancel: function(){
+ },
+
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js
index 22b2794a..d4c98157 100644
--- a/StoneIsland/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/www/js/lib/cart/CartShipping.js
@@ -6,11 +6,20 @@ var CartShipping = View.extend({
},
initialize: function(){
+ this.$form = this.$("form")
+ this.$msg = this.$(".msg")
this.address = new AddressView ({ parent: this })
},
-
+
show: function(){
- document.body.className = "cart_shipping"
+ app.cart.el.className = "shipping"
+ app.footer.show("PAYMENT >", "CANCEL")
+ },
+
+ save: function(){
+ },
+
+ cancel: function(){
},
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js
index 37400dd0..6233dfc7 100644
--- a/StoneIsland/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/www/js/lib/cart/CartSummary.js
@@ -7,5 +7,16 @@ var CartSummary = View.extend({
initialize: function(){
},
+
+ show: function(){
+ app.cart.el.className = "summary"
+ app.footer.show("SHIPPING >", "CANCEL")
+ },
+
+ ok: function(){
+ },
+
+ cancel: function(){
+ },
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartThanks.js b/StoneIsland/www/js/lib/cart/CartThanks.js
index e4dff0a3..991f603b 100644
--- a/StoneIsland/www/js/lib/cart/CartThanks.js
+++ b/StoneIsland/www/js/lib/cart/CartThanks.js
@@ -7,5 +7,15 @@ var CartThanks = View.extend({
initialize: function(){
},
+
+ show: function(){
+ app.cart.el.className = "thanks"
+ app.footer.show("< BACK TO COLLECTION")
+ app.footer.hide()
+ },
+
+ ok: function(){
+ app.router.go("store")
+ },
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartView.js b/StoneIsland/www/js/lib/cart/CartView.js
index 0292068d..7744ad9d 100644
--- a/StoneIsland/www/js/lib/cart/CartView.js
+++ b/StoneIsland/www/js/lib/cart/CartView.js
@@ -3,6 +3,9 @@ var CartView = View.extend({
el: "#cart",
events: {
+ "click .summary": "show_summary",
+ "click .shipping": "show_shipping",
+ "click .payment": "show_payment",
},
initialize: function(){
@@ -10,10 +13,24 @@ var CartView = View.extend({
this.payment = new CartPayment ()
this.shipping = new CartShipping ()
this.confirm = new CartConfirm ()
+ this.thanks = new CartThanks ()
},
show: function(){
document.body.className = "cart"
+ this.show_summary()
+ },
+
+ show_summary: function(){
+ this.el.className = "summary"
+ },
+
+ show_shipping: function(){
+ this.el.className = "shipping"
+ },
+
+ show_payment: function(){
+ this.el.className = "payment"
},
}) \ No newline at end of file