Bugzilla – Attachment 123793 Details for
Bug 28180
Use a lightbox gallery to display the images on the detail pages in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28180: Fix collision with existing verify_images
Bug-28180-Fix-collision-with-existing-verifyimages.patch (text/plain), 4.56 KB, created by
Jonathan Druart
on 2021-08-11 13:07:33 UTC
(
hide
)
Description:
Bug 28180: Fix collision with existing verify_images
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-08-11 13:07:33 UTC
Size:
4.56 KB
patch
obsolete
>From 413afed3d449bf61e753d8ff7464089be9da5a03 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 11 Aug 2021 13:58:54 +0200 >Subject: [PATCH] Bug 28180: Fix collision with existing verify_images > >At the OPAC we already had a verify_images JS function in amazonimages.js >It's preferable to use another function name. >This patch replace our verify_images with verify_cover_images and apply >the change to the staff code as well. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/pages/results.js | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 5 +++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++-- > 4 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 4f7589697a7..619733cc54a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -1033,7 +1033,7 @@ Note that permanent location is a code, and location may be an authval. > var interface = "[% interface | html %]"; > var theme = "[% theme | html %]"; > // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html >- function verify_images() { >+ function verify_cover_images() { > // Loop over each container in the template which contains covers > $(".cover-slider").each(function(){ > var lightbox_descriptions = []; >@@ -1310,7 +1310,7 @@ Note that permanent location is a code, and location may be an authval. > }); > > $(window).load(function() { >- verify_images(); >+ verify_cover_images(); > }); > </script> > [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >index 785817c0976..d5416387b48 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >@@ -1,6 +1,6 @@ > /* global KOHA biblionumber new_results_browser addMultiple vShelfAdd openWindow search_result SEARCH_RESULTS PREF_LocalCoverImages PREF_IntranetCoce PREF_CoceProviders CoceHost CoceProviders addRecord delSingleRecord PREF_BrowseResultSelection resetSearchContext addBibToContext delBibToContext getContextBiblioNumbers holdfor_cardnumber holdforclub strQuery PREF_NotHighlightedWords __ */ > >-function verify_images() { >+function verify_cover_images() { > /* Loop over each container in the template which contains covers */ > var coverSlides = $(".cover-slides"); /* One coverSlides for each search result */ > coverSlides.each( function( index ){ >@@ -101,7 +101,7 @@ function verify_images() { > } > > $(window).load(function() { >- verify_images(); >+ verify_cover_images(); > }); > > var Sticky; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index f6c8daeca48..c103f0ec4cf 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -214,6 +214,11 @@ $.widget.bridge('uitooltip', $.ui.tooltip); > var query_cgi = "[% query_cgi | html %]"; > [% END %] > >+ [% IF ( OPACAmazonCoverImages || SyndeticsCoverImages ) %] >+ $(window).load(function() { >+ verify_images(); >+ }); >+ [% END %] > $(".print-large").on("click",function(){ > window.print(); > return false; >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 43747817fda..03f41fe8317 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1554,7 +1554,7 @@ > } > [% END # /IF OpacHighlightedWords %] > >- function verify_images() { >+ function verify_cover_images() { > // Loop over each container in the template which contains covers > $(".cover-slider").each(function( index ){ > var lightbox_descriptions = []; >@@ -1682,7 +1682,7 @@ > } /* /verify_images */ > > $(window).load(function() { >- verify_images(); >+ verify_cover_images(); > }); > > $(document).ready(function() { >-- >2.25.1
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 28180
:
119918
|
119919
|
119920
|
119921
|
119922
|
119923
|
119924
|
120444
|
120445
|
120446
|
120447
|
120448
|
120449
|
120450
|
120464
|
120465
|
120466
|
120467
|
120468
|
120469
|
120470
|
120753
|
120754
|
120805
|
122783
|
122784
|
123178
|
123790
|
123792
|
123793
|
123794
|
124819
|
125666
|
126041
|
126042
|
126506
|
126507
|
126508
|
126509
|
126510
|
126511
|
126512
|
126513
|
126514
|
126515
|
126516
|
126517
|
126518
|
126519
|
126520
|
126596
|
126597
|
126598
|
126599
|
126600
|
126601
|
126602
|
126603
|
126604
|
126605
|
126606
|
126607
|
126608
|
126609
|
126610