Forráskód Böngészése

Add show-more to facets

Jordi Boggiano 7 éve
szülő
commit
cc5665c4c6

+ 10 - 0
src/Packagist/WebBundle/Resources/public/css/main.css

@@ -449,6 +449,16 @@ strong {
     font-weight: bold;
 }
 
+.search-facets .ais-show-more {
+    cursor: pointer;
+    margin-top: 10px;
+    display: inline-block;
+}
+.search-facets .ais-show-more:after {
+    content: '...';
+    display: inline-block;
+}
+
 .wrapper-footer {
     background: #2d2d32;
     font-size: 14px;

+ 3 - 1
src/Packagist/WebBundle/Resources/public/js/search.js

@@ -124,6 +124,7 @@ search.addWidget(
     container: '.search-facets-type',
     attributeName: 'type',
     limit: 15,
+    showMore: true,
     templates: {
       header: 'Package type'
     }
@@ -134,7 +135,8 @@ search.addWidget(
   instantsearch.widgets.menu({
     container: '.search-facets-tags',
     attributeName: 'tags',
-    limit: 20,
+    limit: 15,
+    showMore: true,
     templates: {
       header: 'Tags'
     }