mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-05 02:41:33 +00:00
Scrolling to groups when hotlinked
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
Darkswarm.controller "GroupsCtrl", ($scope, Groups) ->
|
||||
Darkswarm.controller "GroupsCtrl", ($scope, Groups, $anchorScroll, $rootScope) ->
|
||||
$scope.Groups = Groups
|
||||
$scope.order = 'position'
|
||||
|
||||
$rootScope.$on "$locationChangeSuccess", (newRoute, oldRoute) ->
|
||||
$anchorScroll()
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
"ng-debounce" => "150",
|
||||
"ofn-disable-enter" => true}
|
||||
|
||||
.group{"ng-repeat" => "group in Groups.groups | filter:query | orderBy:order"}
|
||||
|
||||
.group{"ng-repeat" => "group in Groups.groups | filter:query | orderBy:order",
|
||||
name: "group{{group.id}}",
|
||||
id: "group{{group.id}}"}
|
||||
.row.pad-top{bindonce: true}
|
||||
.small-12.columns
|
||||
.group-hero
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
%ul
|
||||
- for group in current_distributor.groups
|
||||
%li
|
||||
%a{href: main_app.groups_path}= group.name
|
||||
%a{href: main_app.groups_path(anchor: "#/#group#{group.id}")}= group.name
|
||||
|
||||
Reference in New Issue
Block a user