From a656ccf5376287c9a572e2db4771dae12a4c1afa Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 21 Apr 2020 20:11:17 +0000 Subject: [PATCH] Bug 24957: OpenLibrarySearch shouldnt display if nothing is returned TO TEST: 1. Turn on OpenLibrarySearch 2. Do an OPAC search that returns results that have results with Open Library results and some that do not. 3. Notice results that return nothing simpliy say "Open Library:" with nothing afterwards. 4. Some results return a png from OpenLibrary or "Not found" 5. Apply patch and look at records again. 6. The results that return nothing for OpenLibrary API should now to hidden. Signed-off-by: Heather Hernandez Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js b/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js index 1c2a9f26cf..c33778de3c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js @@ -178,6 +178,8 @@ function default_decorate_el_fn(el, bookdata) { } if (decoration) { el.innerHTML += decoration; + } else { + el.style.visibility = 'hidden'; } } -- 2.39.5