File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1623,6 +1623,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){
1623
1623
, facetKeys = Object . keys ( facets )
1624
1624
, textfacets = [ ]
1625
1625
, rangefacets = [ ]
1626
+ , sortedFacets = [ ]
1626
1627
, singlefacet = { }
1627
1628
, self = this
1628
1629
, facetVal = ""
@@ -1689,15 +1690,27 @@ var unbxdSearchInit = function(jQuery, Handlebars){
1689
1690
if ( ( singlefacet . unordered . length ) > 0 ) rangefacets . push ( singlefacet ) ;
1690
1691
1691
1692
}
1693
+ if ( singlefacet . unordered && ( singlefacet . unordered . length ) > 0 ) {
1694
+ sortedFacets . push ( singlefacet ) ;
1695
+ }
1692
1696
}
1693
1697
1694
1698
if ( this . getClass ( this . options . facetTemp ) == 'Function' ) {
1695
- this . options . facetTemp . call ( this , { facets : textfacets , rangefacets : rangefacets } ) ;
1699
+ this . options . facetTemp . call ( this , {
1700
+ facets : textfacets ,
1701
+ rangefacets : rangefacets ,
1702
+ sortedFacets : sortedFacets
1703
+ } ) ;
1696
1704
} else {
1697
1705
if ( ! this . compiledFacetTemp && this . options . facetTemp . length )
1698
1706
this . compiledFacetTemp = Handlebars . compile ( this . options . facetTemp ) ;
1699
1707
1700
- this . options . facetContainerSelector . length && jQuery ( this . options . facetContainerSelector ) . html ( this . compiledFacetTemp ( { facets : textfacets , rangefacets : rangefacets } ) ) ;
1708
+ this . options . facetContainerSelector . length &&
1709
+ jQuery ( this . options . facetContainerSelector ) . html ( this . compiledFacetTemp ( {
1710
+ facets : textfacets ,
1711
+ rangefacets : rangefacets ,
1712
+ sortedFacets : sortedFacets
1713
+ } ) ) ;
1701
1714
}
1702
1715
1703
1716
this . paintSelectedFacets ( ) ;
You can’t perform that action at this time.
0 commit comments