mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
And patching bugs in nav
This commit is contained in:
@@ -14,3 +14,6 @@ Darkswarm.controller "HubNodeCtrl", ($scope, HashNavigation, $location, $anchorS
|
||||
$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()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Darkswarm.controller "HubsCtrl", ($scope, Hubs) ->
|
||||
Darkswarm.controller "HubsCtrl", ($scope, Hubs, $anchorScroll, $rootScope, HashNavigation) ->
|
||||
$scope.Hubs = Hubs
|
||||
$scope.hubs = Hubs.hubs
|
||||
|
||||
$rootScope.$on "$locationChangeSuccess", (newRoute, oldRoute) ->
|
||||
if HashNavigation.active "hubs"
|
||||
$anchorScroll()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Darkswarm.controller "ProducerNodeCtrl", ($scope, Navigation, $anchorScroll) ->
|
||||
Darkswarm.controller "ProducerNodeCtrl", ($scope, HashNavigation, $anchorScroll) ->
|
||||
$scope.toggle = ->
|
||||
Navigation.navigate $scope.producer.path
|
||||
HashNavigation.navigate $scope.producer.hash
|
||||
|
||||
$scope.open = ->
|
||||
Navigation.active($scope.producer.path)
|
||||
HashNavigation.active($scope.producer.hash)
|
||||
|
||||
if $scope.open()
|
||||
$anchorScroll()
|
||||
|
||||
Reference in New Issue
Block a user