Bugzilla – Attachment 158101 Details for
Bug 35192
Highlight search terms in OPAC Title notes tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35192: Highlight search terms in the OPAC Title notes tab
Bug-35192-Highlight-search-terms-in-the-OPAC-Title.patch (text/plain), 1.88 KB, created by
Alex Buckley
on 2023-10-30 19:21:34 UTC
(
hide
)
Description:
Bug 35192: Highlight search terms in the OPAC Title notes tab
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2023-10-30 19:21:34 UTC
Size:
1.88 KB
patch
obsolete
>From 03bc15c42dd6f9d64525a1f03027a6a908026635 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 30 Oct 2023 19:03:35 +0000 >Subject: [PATCH] Bug 35192: Highlight search terms in the OPAC Title notes tab > >Test plan: >1. Create a biblio record with the word 'Fish' in the title (245$a) and >the summary (520$a) >2. Set 'OpacHighlightedWords' system preference to 'Highlight' >3. Submit an OPAC search with the search term of 'Fish'. Click on the biblio created in #1 >4. Notice 'Fish' in the title is highlighted, as is the Summary. Scroll >down to the Holdings table. Click on 'Title notes' and notice 'Fish' is >not highlighted in the 'Title notes' >5. Apply patch and restart services >6. Refresh the biblio page. Click on the 'Title notes' tab again >7. Notice 'Fish' is highlighted in the 'Title notes' tab >8. Right click, click 'Inspect element'. Confirm there are no JavaScript >errors in the console. > >Sponsored-by: Catalyst IT, New Zealand >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index c62cda27266..543a3d68503 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1482,6 +1482,7 @@ > q_array[x] = q_array[x].toLowerCase(); > var myStopwords = "[% Koha.Preference('NotHighlightedWords') | html %]".toLowerCase().split('|'); > if( $.inArray(q_array[x], myStopwords) == -1 ) { >+ $("#descriptions").highlight(q_array[x]); > $(".title").highlight(q_array[x]); > $(".author").highlight(q_array[x]); > $(".results_summary").highlight(q_array[x]); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35192
: 158101