Fixing a couple of paths and clearing localStorage when changing distributor

This commit is contained in:
Will Marshall
2014-06-06 13:57:32 +10:00
parent c32776c6b8
commit 92eca72f4f
3 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
Darkswarm.directive "ofnEmptiesCart", (CurrentHub, CurrentOrder, Navigation) ->
Darkswarm.directive "ofnEmptiesCart", (CurrentHub, CurrentOrder, Navigation, storage) ->
restrict: "A"
scope:
hub: '=ofnEmptiesCart'
@@ -10,6 +10,7 @@ Darkswarm.directive "ofnEmptiesCart", (CurrentHub, CurrentOrder, Navigation) ->
elm.bind 'click', (ev)->
ev.preventDefault()
if confirm "Are you sure? This will change your selected Hub and remove any items in you shopping cart."
storage.clearAll()
Navigation.go scope.hub.path
else
scope.action = attr.shop