diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-24 20:57:41 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-24 20:57:41 -0500 |
| commit | 612561818f907f0f9988247c82ec158ba4494986 (patch) | |
| tree | 8bbc773dad7a6364cbdb8aed2ef4cab04854f49a /StoneIsland/platforms/ios/www/js/lib/cart/CartView.js | |
| parent | d548a7d02ce6349ca9a820b6824e4374b759812b (diff) | |
build
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/cart/CartView.js')
| -rw-r--r-- | StoneIsland/platforms/ios/www/js/lib/cart/CartView.js | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js index 5d741492..8bea43dc 100644 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js @@ -3,16 +3,48 @@ var CartView = View.extend({ el: "#cart", events: { + "click .summary_step": "show_summary", + "click .shipping_step": "show_shipping", + "click .payment_step": "show_payment", }, initialize: function(){ - this.summary = new CartSummary () - this.billing = new CartBilling () - this.shipping = new CartShipping () + this.summary = new CartSummary ({ parent: this }) + this.payment = new CartPayment ({ parent: this }) + this.shipping = new CartShipping ({ parent: this }) + this.confirm = new CartConfirm ({ parent: this }) + this.thanks = new CartThanks ({ parent: this }) + + this.$itemcount = this.$(".itemcount") + }, + + load: function(){ + sdk.cart.get_status({ + success: function(data){ + this.summary.data = data + this.summary.updateCounts() + }.bind(this), + error: function(data){ + console.log(data) + }, + }) }, show: function(){ document.body.className = "cart" + this.show_summary() + }, + + show_summary: function(){ + this.summary.show() + }, + + show_shipping: function(){ + this.shipping.show() + }, + + show_payment: function(){ + this.payment.show() }, })
\ No newline at end of file |
