Changes for page Solr Search

Last modified by Monika Leung on 2025/04/05 16:25

From version 2.1
edited by Monika Leung
on 2023/09/08 16:45
Change comment: Install extension [org.xwiki.platform:xwiki-platform-search-solr-ui/15.7]
To version 1.1
edited by Sys Admin
on 2023/08/21 16:32
Change comment: Install extension [org.xwiki.platform:xwiki-platform-search-solr-ui/15.6]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.leung
1 +XWiki.sysadmin
XWiki.JavaScriptExtension[0]
code
... ... @@ -37,21 +37,14 @@
37 37   }
38 38   };
39 39  
40 - var addFacetValueCheckbox = function(index) {
41 - // Create an id unique to the facet value.
42 - let facetContainer = $(this).parents('.search-facet').first();
43 - $(this).attr('id', facetContainer.attr('data-name') + '-' + index.toString());
44 - // Initialize the checkbox.
45 - let checkBox = $(document.createElement('input')).attr('type', 'checkbox');
46 - checkBox.attr('aria-labelledby', $(this).attr('id'));
40 + var addFacetValueCheckbox = function() {
41 + var checkBox = $(document.createElement('input')).attr('type', 'checkbox');
47 47   checkBox.prop('checked', $(this).hasClass('selected'));
48 48   // Add the 'checked' attribute so that it can be easily located with CSS.
49 49   checkBox.prop('checked') && checkBox.attr('checked', 'checked');
50 50   checkBox.on('click', this.click.bind(this));
51 - // Remove the 'selected' class because the selected state is already marked using the check box.
52 - $(this).removeClass('selected')
53 - // Add the checkbox to the DOM
54 - $(this).before(checkBox)
46 + // Remove the 'selected' class because the selected state is marked using the check box.
47 + $(this).removeClass('selected').before(checkBox);
55 55   };
56 56  
57 57   var enhanceSearchFacets = function() {
XWiki.StyleSheetExtension[0]
code
... ... @@ -329,8 +329,6 @@
329 329  }
330 330  
331 331  .search-facet-body li {
332 - display: flex;
333 - flex-wrap: wrap;
334 334   padding: .1em .2em;
335 335  }
336 336  
... ... @@ -355,6 +355,7 @@
355 355  }
356 356  
357 357  .search-facet-body input[type="checkbox"] {
356 + float: left;
358 358   margin: .2em 0;
359 359  }
360 360  
... ... @@ -385,8 +385,8 @@
385 385  }
386 386  
387 387  .search-facet-body .itemCount {
387 + float: right;
388 388   padding: .1em 0;
389 - margin-left: auto;
390 390  }
391 391  
392 392  @media (max-width: 768px) {