mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Fixing a couple of paths and clearing localStorage when changing distributor
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
%span.nav-primary Hubs
|
||||
%li.divider
|
||||
%li
|
||||
%a{href: map_path}
|
||||
%a{href: main_app.map_path}
|
||||
%span.nav-primary Map
|
||||
%li.divider
|
||||
%li
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
%i.ofn-i_040-hub
|
||||
Hubs
|
||||
%li
|
||||
%a{href: ""}
|
||||
%a{href: main_app.map_path}
|
||||
%span.nav-primary
|
||||
%i.ofn-i_037-map
|
||||
Map
|
||||
|
||||
Reference in New Issue
Block a user