Bugzilla – Attachment 40598 Details for
Bug 14345
parsed isbn has semi-colon fails to nicely link for idreambooks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14345: broken isbn logic prevents display of idreambooks image
Bug-14345-broken-isbn-logic-prevents-display-of-id.patch (text/plain), 2.19 KB, created by
Mark Tompsett
on 2015-06-24 18:44:37 UTC
(
hide
)
Description:
Bug 14345: broken isbn logic prevents display of idreambooks image
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-06-24 18:44:37 UTC
Size:
2.19 KB
patch
obsolete
>From 5c8e37b4fc2198d7e0918ef1a8451df662d46d82 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >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 <nick@quecheelibrary.org> >--- > 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 5e7591d..6797ba5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1633,7 +1633,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('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="https://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+_(" by ")+json.book.author+'" title="'+_("Rating based on reviews of ")+json.book.title+'"></a>'); >-- >2.1.4
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 14345
:
39913
|
40105
|
40598
|
40760