mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Popup dialog when changing hub:
This commit is contained in:
@@ -11,6 +11,10 @@ Darkswarm.controller "HubNodeCtrl", ($scope, Navigation, $location, $anchorScrol
|
||||
$scope.emptiesCart = ->
|
||||
CurrentHub.id isnt undefined and !$scope.current()
|
||||
|
||||
$scope.changeHub = ->
|
||||
if confirm "Are you sure? This will change your selected Hub and remove any items in you shopping cart."
|
||||
Navigation.go $scope.hub.path
|
||||
|
||||
if $scope.open()
|
||||
$anchorScroll()
|
||||
|
||||
|
||||
@@ -9,3 +9,6 @@ Darkswarm.factory 'Navigation', ($location) ->
|
||||
$location.path("/")
|
||||
else
|
||||
$location.path(@path)
|
||||
|
||||
go: (path)->
|
||||
window.location.pathname = path
|
||||
|
||||
Reference in New Issue
Block a user