Filtering between selector lists

This commit is contained in:
Rob Harrington
2015-03-15 13:25:04 +11:00
parent 29c9f70a1c
commit 2b32252aff
3 changed files with 7 additions and 4 deletions

View File

@@ -25,6 +25,9 @@ Darkswarm.directive "filterSelector", (FilterSelectorsService)->
scope.$on 'loadFilterSelectors', ->
scope.allSelectors = scope.selectors()
scope.$watchCollection "selectors()", (newValue, oldValue) ->
scope.allSelectors = scope.selectors()
# Build a list of selectors
scope.selectors = ->
# Generate a selector for each object.

View File

@@ -62,8 +62,8 @@ Darkswarm.directive 'singleLineSelectors', ($timeout, $filter) ->
if scope.allSelectors?
scope.fitting = true
selector.fits = true for selector in scope.allSelectors
loadWidths()
fit()
$timeout(loadWidths, 0, true).then ->
$timeout fit, 0, true
$(window).resize debouncer (e) ->
scope.fitting = true

View File

@@ -1,5 +1,5 @@
.filter-shopfront.taxon-selectors.animate-hide.text-right
%single-line-selectors{ objects: "Products.products | products:query | taxonsOf", "active-selectors" => "activeTaxons"}
%single-line-selectors{ objects: "Products.products | products:query | properties: activeProperties | taxonsOf", "active-selectors" => "activeTaxons"}
.filter-shopfront.property-selectors.animate-hide.text-right
%single-line-selectors{ objects: "Products.products | products:query | propertiesOf", "active-selectors" => "activeProperties"}
%single-line-selectors{ objects: "Products.products | products:query | taxons:activeTaxons | propertiesOf", "active-selectors" => "activeProperties"}