Problem zooming images in print view

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
fgazza
Veteran Member
Posts: 205
Joined: 2019-04-30 17:37

Problem zooming images in print view

Post by fgazza » 2019-08-14 14:03

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

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Problem zooming images in print view

Post by jsetzer » 2019-08-14 16:37

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&amp;t=categories&amp;f=Picture&amp;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&amp;t=categories&amp;f=Picture&amp;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&amp;t=categories&amp;f=Picture&amp;v=tv" class="img-thumbnail">
Regards,
Jan
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

fgazza
Veteran Member
Posts: 205
Joined: 2019-04-30 17:37

Re: Problem zooming images in print view

Post by fgazza » 2019-08-14 16:54

Thank you Jan!
But... where do i have to put your code?
Thanks!
Fabiano

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Problem zooming images in print view

Post by jsetzer » 2019-08-14 17:37

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
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply