Page 1 of 1
Problem zooming images in print view
Posted: 2019-08-14 14:03
by fgazza
Hi everyone!
I use apps version 5.76.
I think there is a problem in zooming the images in the print preview.
What happens to me on my site also happens in the northwind demo
Look at the link:
https://bigprof.com/demo/categories_view.php
Does anyone have any idea how to solve the error?
Thank you!
Fabiano
Re: Problem zooming images in print view
Posted: 2019-08-14 16:37
by jsetzer
Hi,
I guess you mean the hourglass when you click am image and the full-size-picture not showing up in the print-preview?
I'm wondering if the zooming functionality is required at all in print preview. Maybe you should try to disable the lightbox integration for print view using JQuery:
Those images' parent <a>'s all have a "data-lightbox"-attribute. Try to remove this attribute. This will disable lightbox-funtionality on the links.
Code: Select all
<a data-lightbox="categories-Picture"><img src="thumbnail.php?i=21602000_1344483775.jpg&t=categories&f=Picture&v=tv" class="img-thumbnail"></a>
Remove data-lightbox atribute from <a> tag:
Code: Select all
<a><img src="thumbnail.php?i=21602000_1344483775.jpg&t=categories&f=Picture&v=tv" class="img-thumbnail"></a>
Or perhaps unwrap the <img> and remove <a> completely:
Code: Select all
<img src="thumbnail.php?i=21602000_1344483775.jpg&t=categories&f=Picture&v=tv" class="img-thumbnail">
Regards,
Jan
Re: Problem zooming images in print view
Posted: 2019-08-14 16:54
by fgazza
Thank you Jan!
But... where do i have to put your code?
Thanks!
Fabiano
Re: Problem zooming images in print view
Posted: 2019-08-14 17:37
by jsetzer
Usually I don't use TABLENAME_header- and TABLENAME_footer-functions, but I guess for print preview this is a good place to do the changes:
Code: Select all
function TABLENAME_footer($contentType, $memberInfo, &$args) {
// ...
case 'print-tableview':
$footer='<script>$j("img.img-thumbnail").closest("a").attr("data-lightbox", null);</script>';
break;
// ...
}
I've tested this in one of my apps and it seems to work as expected.
Hope this helps!
Regards,
Jan