Bugzilla – Attachment 155300 Details for
Bug 34724
Remove use of onclick for opac-imageviewer.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34724: (QA follow-up):
Bug-34724-QA-follow-up.patch (text/plain), 3.24 KB, created by
Pedro Amorim
on 2023-09-07 13:11:38 UTC
(
hide
)
Description:
Bug 34724: (QA follow-up):
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-09-07 13:11:38 UTC
Size:
3.24 KB
patch
obsolete
>From 5f7b98f19e330074b75029f33713402e400d1fc7 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 7 Sep 2023 13:07:27 +0000 >Subject: [PATCH] Bug 34724: (QA follow-up): > >Replace href from thumbnail link with a # to keep pointer event. The href link gets reconstructed by showCover anyway >Remove return false from on click event, its not triggering a location change anymore because of the above >Remove check for imagenumber, its a non-null primary key, if the image exists, then the imagenumber must also exist >The link does not contain translatable strings, it doesnt need to be repeated twice in if-else just for a css class change > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > .../bootstrap/en/modules/opac-imageviewer.tt | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >index 4bc57d82b6..ec2a495acd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >@@ -87,12 +87,8 @@ > <div class="col-lg-3"> > <div id="thumbnails"> > [% FOREACH image IN images %] >- <a class="cover_thumbnail" data-imagenumber="[% image.imagenumber| html %]" href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber | url %]&imagenumber=[% image.imagenumber| uri %]"> >- [% IF loop.first %] >- <img class="thumbnail selected" id="[% image.imagenumber| html %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% image.imagenumber | html %]&thumbnail=1" alt="Thumbnail"/> >- [% ELSE %] >- <img class="thumbnail" id="[% image.imagenumber | html %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% image.imagenumber | html %]&thumbnail=1" alt="Thumbnail"/> >- [% END %] >+ <a href="#" class="cover_thumbnail" data-imagenumber="[% image.imagenumber| html %]"> >+ <img class="thumbnail [% IF loop.first %] selected [% END %]" id="[% image.imagenumber| html %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% image.imagenumber | html %]&thumbnail=1" alt="Thumbnail"/> > </a> > [% END %] > </div> <!-- /#thumbnails --> >@@ -114,11 +110,7 @@ > $("#largeCoverImg").attr("src","[% interface | html %]/[% theme | html %]/images/loading.gif"); > showCover([% imagenumber | html %]); > $("a.cover_thumbnail").on('click',function(){ >- let imagenumber = this.dataset.imagenumber; >- if (imagenumber){ >- showCover(imagenumber); >- } >- return false; >+ showCover(this.dataset.imagenumber); > }); > }); > >-- >2.30.2
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 34724
:
155255
|
155299
|
155300
|
155445
|
155472
|
155758
|
155759