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 @@ -1666,6 +1666,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){
1666
1666
, facetKeys = Object . keys ( facets )
1667
1667
, textfacets = [ ]
1668
1668
, rangefacets = [ ]
1669
+ , sortedFacets = [ ]
1669
1670
, singlefacet = { }
1670
1671
, self = this
1671
1672
, facetVal = ""
@@ -1732,15 +1733,27 @@ var unbxdSearchInit = function(jQuery, Handlebars){
1732
1733
if ( ( singlefacet . unordered . length ) > 0 ) rangefacets . push ( singlefacet ) ;
1733
1734
1734
1735
}
1736
+ if ( singlefacet . unordered && ( singlefacet . unordered . length ) > 0 ) {
1737
+ sortedFacets . push ( singlefacet ) ;
1738
+ }
1735
1739
}
1736
1740
1737
1741
if ( this . getClass ( this . options . facetTemp ) == 'Function' ) {
1738
- this . options . facetTemp . call ( this , { facets : textfacets , rangefacets : rangefacets } ) ;
1742
+ this . options . facetTemp . call ( this , {
1743
+ facets : textfacets ,
1744
+ rangefacets : rangefacets ,
1745
+ sortedFacets : sortedFacets
1746
+ } ) ;
1739
1747
} else {
1740
1748
if ( ! this . compiledFacetTemp && this . options . facetTemp . length )
1741
1749
this . compiledFacetTemp = Handlebars . compile ( this . options . facetTemp ) ;
1742
1750
1743
- this . options . facetContainerSelector . length && jQuery ( this . options . facetContainerSelector ) . html ( this . compiledFacetTemp ( { facets : textfacets , rangefacets : rangefacets } ) ) ;
1751
+ this . options . facetContainerSelector . length &&
1752
+ jQuery ( this . options . facetContainerSelector ) . html ( this . compiledFacetTemp ( {
1753
+ facets : textfacets ,
1754
+ rangefacets : rangefacets ,
1755
+ sortedFacets : sortedFacets
1756
+ } ) ) ;
1744
1757
}
1745
1758
1746
1759
this . paintSelectedFacets ( ) ;
You can’t perform that action at this time.
0 commit comments