mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Hash toggling
This commit is contained in:
@@ -14,7 +14,3 @@ 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()
|
||||
|
||||
|
||||
@@ -13,3 +13,7 @@ window.Darkswarm = angular.module("Darkswarm", ["ngResource",
|
||||
|
||||
# This allows us to trigger these two events on tooltips
|
||||
$tooltipProvider.setTriggers( 'openTrigger': 'closeTrigger' )
|
||||
|
||||
Darkswarm.run ($rootScope, $location, $anchorScroll) ->
|
||||
$rootScope.$on "$locationChangeSuccess", (newRoute, oldRoute) ->
|
||||
$anchorScroll()
|
||||
|
||||
Reference in New Issue
Block a user