Move most filters back out into view - they now respond to filter preference changes

This commit is contained in:
Rohan Mitchell
2015-07-03 17:22:32 +10:00
parent 07e6a204f3
commit d8dfb5b5ee
2 changed files with 1 additions and 5 deletions

View File

@@ -30,10 +30,6 @@ Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, Enterprises, Search
$scope.filterEnterprises = ->
es = Enterprises.hubs
es = visibleFilter(es)
es = taxonsFilter(es, $scope.activeTaxons)
es = shippingFilter(es, $scope.shippingTypes)
es = showHubProfilesFilter(es)
$scope.nameMatches = enterpriseMatchesNameQueryFilter(es, true)
$scope.distanceMatches = enterpriseMatchesNameQueryFilter(es, false)
$scope.distanceMatches = distanceWithinKmFilter($scope.distanceMatches, 50)

View File

@@ -1,5 +1,5 @@
.active_table
%hub.active_table_node.row.animate-repeat{"ng-repeat" => "hub in filteredEnterprises = (#{enterprises} | orderBy:['-active', '+distance', '+orders_close_at'])",
%hub.active_table_node.row.animate-repeat{"ng-repeat" => "hub in filteredEnterprises = (#{enterprises} | visible | taxons:activeTaxons | shipping:shippingTypes | showHubProfiles:show_profiles | orderBy:['-active', '+distance', '+orders_close_at'])",
"ng-class" => "{'is_profile' : hub.category == 'hub_profile', 'closed' : !open(), 'open' : open(), 'inactive' : !hub.active, 'current' : current()}",
"ng-controller" => "HubNodeCtrl",
id: "{{hub.hash}}"}