[Bug 11602] New: Fix localcover display
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Bug ID: 11602 Summary: Fix localcover display Change sponsored?: --- Product: Koha Version: 3.14 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: vanoudt@gmail.com QA Contact: testopia@bugs.koha-community.org I'm busy playing around with updating to the nice new bootstrap theme. We use google jackets most of the time, but have some localcovers stored too. I want to style the localcover imgs the same as any other bookmark. Ideally, they need a thumbnail class. But the 1px image that is returned causes (potentially, at least in my case) things like empty borders. Could the Locacovers.js function be modified to a) include a class of thumbnail for the image b) not insert the image when it is 1px in size. The following function would do that... /** * Search all: * <div title="biblionumber" id="isbn" class="openlibrary-thumbnail"></div> * or * <div title="biblionumber" id="isbn" class="openlibrary-thumbnail-preview"></div> * and run a search with all collected isbns to Open Library Book Search. * The result is asynchronously returned by OpenLibrary and catched by * olCallBack(). */ GetCoverFromBibnumber: function(uselink) { $("div[id^=local-thumbnail],span[id^=local-thumbnail]").each(function(i) { var mydiv = this; var message = document.createElement("span"); $(message).attr("class","no-image"); $(message).html(NO_LOCAL_JACKET); $(mydiv).append(message); var img = $("<img />").attr('src', '/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) .load(function () { this.setAttribute("class", "thumbnail"); if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { //IE HACK try { $(mydiv).append(img); $(mydiv).children('.no-image').remove(); } catch(err){ }; } else if (this.width > 1) { // don't show the silly 1px "no image" img if (uselink) { var a = $("<a />").attr('href', '/cgi-bin/koha/opac-imageviewer.pl?biblionumber=' + $(mydiv).attr("class")); $(a).append(img); $(mydiv).empty().append(a); } else { $(mydiv).empty().append(img); } $(mydiv).children('.no-image').remove(); } }) }); } -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Nicholas van Oudtshoorn <vanoudt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |vanoudt@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 --- Comment #1 from Nicholas van Oudtshoorn <vanoudt@gmail.com> --- Created attachment 28270 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28270&action=edit Add a class to local thumbnails and don't show 1px no-image-found -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Version|3.14 |unspecified Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28270|0 |1 is obsolete| | --- Comment #2 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 45347 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45347&action=edit [SIGNED-OFF]BUG 11602: [ENH] Fix localcover display Adds a css class of thumbnail to local covers Don't show the 1px "No image found" image (since we'll ususally try another image provider) Add a class to local thumbnails and don't show 1px no-image-found Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Box with "No cover image availabe" fixed when syspref OPACLocalCoverImages set to display -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hector.hecaxmmx@gmail.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45347|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 45364 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45364&action=edit [PASSED QA] BUG 11602: [ENH] Fix localcover display Adds a css class of thumbnail to local covers. Don't show the 1px "No image found" image (since we'll ususally try another image provider) Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Box with "No cover image availabe" fixed when syspref OPACLocalCoverImages set to display Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I see 2 sides on this: - It makes local covers behave more like the other cover services, showing the standard 'no-image'. (consistency) - It means a change to existing installations, but the newly showing image can be easily hidden with CSS... so not sure this should stop this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Patch pushed to master. Thanks Nicholas! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.1 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #7 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.7. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 --- Comment #8 from Nicholas van Oudtshoorn <vanoudt@gmail.com> --- Thanks everyone - great to have contributed to Koha! :-) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11602 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Adds a CSS class of release notes| |thumbnail to local covers. | |Don't show the 1px "No | |image found" image (since | |we'll usually try another | |image provider). -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org