Bugzilla – Attachment 40760 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.26 KB, created by
Jonathan Druart
on 2015-07-02 11:26:21 UTC
(
hide
)
Description:
Bug 14345: broken isbn logic prevents display of idreambooks image
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-07-02 11:26:21 UTC
Size:
2.26 KB
patch
obsolete
>From f7c90c0203ce0e12df90760ab23b6a226a89ab23 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> > >Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.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 d79a51c..6799e23 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('<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.0
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