From aa88125f62031ffce95486e6634b960a6886f6a9 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 5 Jun 2015 12:24:22 -0400 Subject: [PATCH] Bug 14345: broken isbn logic prevents display of idreambooks image TEST PLAN --------- 1) Ensure you have a book that would pull up an idreambooks image (e.g. The road to character / David Brooks.) -- I imported from the Library of Congress via z39.50 2) Ensure your system preferences for idreambook stuff is set. 3) Ensure you have multiple 020$a's for your book, and the first one must just be an ISBN number! -- I removed the '(hardcover: acidfree paper)' from the first. -- I took the second 020 field and changed 020$z to 020$a 4) Search for that book in OPAC and go to details. -- There should be a readometer image, but it will be broken. -- Notice the ISBN line has "#############; ..." This could also be attained by just putting two semi-colon separated ISBN's on the first 020$a. 5) Apply this patch 6) Refresh page -- readometer image appears. YAY! 7) run koha qa test tools NOTE: Only changed test plan, so leaving sign-off on. Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d79a51cbca..6799e23feb 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1632,7 +1632,7 @@ function parseIDBJSON( json ) { if(json.total_results > 0 && json.book.rating > 0){ var isbn = $(".isbn:last").text().split(" ")[1]; - isbn = isbn.replace(/-/, ''); + isbn = isbn.replace(/\W+/g, ''); [% IF ( IDreamBooksReadometer ) %] $(".title").append(''+json.book.title+_('); -- 2.39.5