From 5cdedcdb782ab555f994f251b690095474932ab8 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.) 2) Ensure your system preferences for idreambook stuff is set. 3) Search for that book in OPAC and go to details. -- There should be a readometer image, but it will be broken. 4) Apply this patch 5) Refresh page -- readometer image appears. YAY! 6) run koha qa test tools Signed-off-by: Nick Clemens --- 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 840f6ec..2e08e10 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+' by '+json.book.author+''); -- 1.9.1