Koha/koha-tmpl/opac-tmpl/bootstrap
Owen Leonard 5bad8da970 Bug 26037: openlibrary.org is hit on every Koha requests
This patch moves the inclusion of Open Library JavaScript from
opac-bottom.inc to the three templates where it might be used.

In addition, the Open Library JS has been modified to check for the
existence of the relevant markup on the page before executing a query.

Unrelated: The Open Library label is now hidden when the status returned
is "Not found." Previously this information was displayed.

To test, apply the patch and enable the OpenLibrarySearch system
preference.

 - Perform a search in the OPAC which will return results from Open
   Library. Some ISBNs: 0140423826, 0395082552, 0679436405.
   - On the search result page there should be an Open Library "Read
     now" button for each result that can be opened for reading in Open
     Library.
 - Add these titles to a list and view the list.
   - The "Read now" button should appear on the list page.
 - View the details for one of these titles.
   - The "Read now" button should appear on the page below the holdings.
 - Watch the browser's developer tools on these and other pages in the
   OPAC. There should be no errors in the console and no 404 errors in
   the network tab.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-06 11:37:07 +02:00
..
css Compiled CSS (OPAC) 2020-07-27 10:14:35 +02:00
en Bug 26037: openlibrary.org is hit on every Koha requests 2020-08-06 11:37:07 +02:00
images Bug 23903: Replace OPAC icons with Font Awesome 2019-10-31 15:40:25 +00:00
itemtypeimg Bug 23148: (follow-up) Replace gif files in the OPAC with pngs 2020-07-20 16:16:37 +02:00
js Bug 26037: openlibrary.org is hit on every Koha requests 2020-08-06 11:37:07 +02:00
lib Bug 26004: Remove unused jQuery plugin jquery.hoverIntent.minified.js from the OPAC 2020-08-03 11:30:35 +02:00