mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
20 lines
546 B
CoffeeScript
20 lines
546 B
CoffeeScript
Darkswarm.controller "CheckoutCtrl", ($scope, Order, storage) ->
|
|
window.tmp = $scope
|
|
$scope.Order = Order
|
|
$scope.order = Order.order
|
|
$scope.accordion = {}
|
|
|
|
$scope.show = (name)->
|
|
$scope.accordion[name] = true
|
|
|
|
storage.bind $scope, "accordion.user", { defaultValue: true}
|
|
storage.bind $scope, "accordion.details"
|
|
storage.bind $scope, "accordion.billing"
|
|
storage.bind $scope, "accordion.shipping"
|
|
storage.bind $scope, "accordion.payment"
|
|
|
|
$scope.purchase = (event)->
|
|
event.preventDefault()
|
|
$scope.Order.submit()
|
|
|