mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Fixing groups page anchor scrolling
This commit is contained in:
@@ -2,5 +2,7 @@ Darkswarm.controller "GroupsCtrl", ($scope, Groups, $anchorScroll, $rootScope) -
|
||||
$scope.Groups = Groups
|
||||
$scope.order = 'position'
|
||||
|
||||
$rootScope.$on "$locationChangeSuccess", (newRoute, oldRoute) ->
|
||||
$anchorScroll()
|
||||
#$rootScope.$on "$locationChangeSuccess", (newRoute, oldRoute) ->
|
||||
#$anchorScroll()
|
||||
#
|
||||
#
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
= inject_enterprises
|
||||
|
||||
:javascript
|
||||
angular.module('Darkswarm').value('groups', #{render partial: "json/groups", object: @groups})
|
||||
|
||||
@@ -38,9 +39,9 @@
|
||||
.small-6.columns
|
||||
%h5 Our hubs & producers
|
||||
%ul.small-block-grid-2
|
||||
%li{"ng-repeat" => "enterprise in group.enterprises"}
|
||||
%li{"ng-repeat" => "enterprise in group.enterprises", "scroll-after-load" => true}
|
||||
%hub-modal{"ng-if" => "enterprise.is_distributor"}
|
||||
%producer-modal{"ng-if" => "!enterprise.is_distributor"}
|
||||
%producer-modal{"ng-if" => "!enterprise.is_distributor", "show-hub-actions" => 'true'}
|
||||
|
||||
.row.group_footer
|
||||
.small-12.columns
|
||||
|
||||
@@ -8,4 +8,7 @@
|
||||
%ul.bullet-list
|
||||
- for group in current_distributor.groups
|
||||
%li
|
||||
%a{href: main_app.groups_path(anchor: "#/#group#{group.id}")}= group.name
|
||||
= group.id
|
||||
%a{href: main_app.groups_path + "/#/#group#{group.id}"}
|
||||
= group.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user