Bugzilla – Attachment 160140 Details for
Bug 27113
Elasticsearch: Autocomplete in search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27113: (follow-up) diacritics/acccents in sought word would make autocomplete return nothing
Bug-27113-follow-up-diacriticsacccents-in-sought-w.patch (text/plain), 2.21 KB, created by
Salah Ghedda
on 2023-12-20 17:09:36 UTC
(
hide
)
Description:
Bug 27113: (follow-up) diacritics/acccents in sought word would make autocomplete return nothing
Filename:
MIME Type:
Creator:
Salah Ghedda
Created:
2023-12-20 17:09:36 UTC
Size:
2.21 KB
patch
obsolete
>From deba32b7cd332b05a438886fa39bbd5b2df4375f Mon Sep 17 00:00:00 2001 >From: Blou <blou@inlibro.com> >Date: Mon, 9 Jan 2023 16:32:03 -0500 >Subject: [PATCH] Bug 27113: (follow-up) diacritics/acccents in sought word > would make autocomplete return nothing > >--- > koha-tmpl/intranet-tmpl/js/elasticsearch/autocomplete.js | 1 + > .../bootstrap/js/opac-elasticsearch/opac-autocomplete.js | 1 + > 2 files changed, 2 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/js/elasticsearch/autocomplete.js b/koha-tmpl/intranet-tmpl/js/elasticsearch/autocomplete.js >index 6c9ff58330..ae89321796 100644 >--- a/koha-tmpl/intranet-tmpl/js/elasticsearch/autocomplete.js >+++ b/koha-tmpl/intranet-tmpl/js/elasticsearch/autocomplete.js >@@ -116,6 +116,7 @@ function autocomplete(inp, nb, left, right) { > > myset = GetSetAutocomplete(data, prefix, key); > /* append set to autocomplete */ >+ tmp_input = tmp_input.normalize("NFD").replace(/\p{Diacritic}/gu, ""); > if ( tmp_input + prefix == data['val'] + data['prefix'] && token_counter === parseInt(data['token_counter'], 10)){ > a.innerHTML = ""; > for (let item of myset){ >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/opac-elasticsearch/opac-autocomplete.js b/koha-tmpl/opac-tmpl/bootstrap/js/opac-elasticsearch/opac-autocomplete.js >index 0bcdb9dc82..b37d8e3b22 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/opac-elasticsearch/opac-autocomplete.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/opac-elasticsearch/opac-autocomplete.js >@@ -112,6 +112,7 @@ function autocomplete(inp, nb, left, right) { > > myset = GetSetAutocomplete(data, prefix, key); > /* append set to autocomplete */ >+ tmp_input = tmp_input.normalize("NFD").replace(/\p{Diacritic}/gu, ""); > if ( tmp_input + prefix == data['val'] + data['prefix'] && token_counter === parseInt(data['token_counter'], 10)){ > a.innerHTML = ""; > for (let item of myset){ >-- >2.34.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 27113
:
114168
|
114169
|
114945
|
115117
|
116293
|
119979
|
120028
|
120029
|
120084
|
120088
|
120109
|
120140
|
120141
|
120806
|
121497
|
121498
|
121555
|
121556
|
121557
|
121558
|
131207
|
131208
|
131209
|
131210
|
131211
|
132360
|
132361
|
132362
|
132363
|
132364
|
132808
|
132945
|
132946
|
133042
|
133045
|
133407
|
133409
|
133410
|
136312
|
136456
|
136457
|
136464
|
136465
|
136653
|
136657
|
136658
|
136659
|
136660
|
137436
|
137437
|
137438
|
137439
|
137780
|
137781
|
137782
|
137783
|
139624
|
141466
|
145167
|
146015
|
159769
|
159770
|
159771
|
159772
|
159773
|
159774
|
159775
|
160134
|
160135
|
160136
|
160137
|
160138
|
160139
|
160140
|
160141
|
160142
|
161076
|
161077
|
163826
|
165895
|
165896
|
165897
|
165898
|
165899
|
165900
|
165901
|
165902
|
165903
|
165904
|
165913
|
165922