Bug 39223: Fix the OPAC browse search (opac-browse.pl)
This fixes the OPAC browse search feature (OpacBrowseSearch system preference, Elasticsearch only). Expanding and collapsing the search results was not working. Test plan: 1. Start up KTD using Elasticsearch; ktd --es7 up 2. Enable the OpacBrowseSearch system preference. 3. In the OPAC, click 'Browse search' (one of the options under the search box). 4. Search for 'a', for the search type use Author, then click Search. 5. Click on one of the search results - note that it doesn't expand to show the titles for the author. 6. Apply the patch. 7. Refresh the page and repeat steps 3 to 5. Note that the author section now expands andd collapses when clicked, and that the titles for the author are now shown. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit448b9cd17e) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> (cherry picked from commitf222847062) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
fda49309c0
commit
2ae12cf6c2
|
|
@ -104,7 +104,7 @@
|
|||
<a class="expand-result" href="#" data-bs-toggle="collapse" aria-expanded="false" aria-controls="collapse">
|
||||
</a>
|
||||
</div> <!-- /#heading.card-header -->
|
||||
<div id="collapse" class="collapse" aria-labelledby="heading" data-parent="#browse-searchresults">
|
||||
<div id="collapse" class="collapse" aria-labelledby="heading" data-bs-parent="#browse-searchresults">
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div> <!-- /#collapse.collapse -->
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ $(document).ready(function(){
|
|||
card
|
||||
.find(".card-header")
|
||||
.attr("id", "heading" + index)
|
||||
.find("a").attr("data-target", "#collapse" + index)
|
||||
.find("a").attr("data-bs-target", "#collapse" + index)
|
||||
.attr("aria-controls", "collapse" + index)
|
||||
.text(object.text);
|
||||
card
|
||||
|
|
@ -89,7 +89,7 @@ $(document).ready(function(){
|
|||
}
|
||||
|
||||
var link = $(this);
|
||||
var target = link.data("target");
|
||||
var target = link.data("bs-target");
|
||||
var term = link.text();
|
||||
|
||||
var field = $('#browse-searchresults').data('field');
|
||||
|
|
|
|||
Loading…
Reference in New Issue