blob: 7744ad9d88adc8896dce8abd946cbffa1117eaab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
var CartView = View.extend({
el: "#cart",
events: {
"click .summary": "show_summary",
"click .shipping": "show_shipping",
"click .payment": "show_payment",
},
initialize: function(){
this.summary = new CartSummary ()
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"
},
})
|