Rescoping the accordion as well

This commit is contained in:
Will Marshall
2014-06-06 16:53:09 +10:00
parent c9d0091cd9
commit 6c5b514b9b

View File

@@ -1,16 +1,11 @@
Darkswarm.controller "AccordionCtrl", ($scope, storage, $timeout) ->
Darkswarm.controller "AccordionCtrl", ($scope, storage, $timeout, CurrentHub) ->
$scope.accordion =
details: true
shipping: false
payment: false
billing: false
storage.bind $scope, "accordion", {storeName: "accordion_#{$scope.order.id}"}
storage.bind $scope, "accordion", {storeName: "accordion_#{$scope.order.id}#{CurrentHub.id}#{$scope.order.user_id}"}
$scope.show = (name)->
$scope.accordion[name] = true
#$timeout =>
#if $scope.checkout.$valid
#for k, v of $scope.accordion
#$scope.accordion[k] = false