From d8dfb5b5eec89532d91b6f4e6b92008e04da5f52 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 3 Jul 2015 17:22:32 +1000 Subject: [PATCH] Move most filters back out into view - they now respond to filter preference changes --- .../darkswarm/controllers/enterprises_controller.js.coffee | 4 ---- app/views/home/_hubs_table.html.haml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/assets/javascripts/darkswarm/controllers/enterprises_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/enterprises_controller.js.coffee index 35ab2cb9fc..ac99cc267a 100644 --- a/app/assets/javascripts/darkswarm/controllers/enterprises_controller.js.coffee +++ b/app/assets/javascripts/darkswarm/controllers/enterprises_controller.js.coffee @@ -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) diff --git a/app/views/home/_hubs_table.html.haml b/app/views/home/_hubs_table.html.haml index fa2de8bc3b..0c7ae45868 100644 --- a/app/views/home/_hubs_table.html.haml +++ b/app/views/home/_hubs_table.html.haml @@ -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}}"}