Fixing groups page anchor scrolling

This commit is contained in:
Will Marshall
2014-06-25 10:46:32 +10:00
parent edd9d93b8c
commit 5f242f9232
3 changed files with 11 additions and 5 deletions

View File

@@ -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()
#
#

View File

@@ -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

View File

@@ -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