Bug 7594: Google Cover Javascript contains hardcoded CSS style
authorOwen Leonard <oleonard@myacpl.org>
Tue, 22 Mar 2016 12:07:44 +0000 (08:07 -0400)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 23 Mar 2016 23:07:36 +0000 (23:07 +0000)
The JavaScript which handles the display of Google book cover images
includes a hard-coded "style" attribute. It may have been relevant to
the design of the old prog template, but it doesn't seem to have any use
in the Bootstrap one. This patch removes it.

I have replaced the style attribute with a class in case someone needs
a hook for some custom CSS.

To test, apply the patch, enable the GoogleJackets system preference,
and clear your browser cache if necessary.

- Search for a title in the OPAC which has a Google book cover image
  associated with it.
- View the detail page for that title. Confirm that the "Google Preview"
  link underneath the cover image looks correct.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js

index 49566ed..85592cd 100644 (file)
@@ -55,7 +55,7 @@ KOHA.Google = {
                      var re = /^gbs-thumbnail-preview/;
                      if ( re.exec($(this).attr("id")) ) {
                          $(this).append(
-                             '<div style="margin-bottom:5px; margin-top:-5px;font-size:9px">' +
+                             '<div class="google-books-preview">' +
                              '<a '+target+'href="' +
                              book.info_url +
                              '"><img src="' +