Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightboxes with a iframe triggered by an image with class="no-lightbox" use to work on 0.9.2 but they stopped working in 0.10.0 #317

Open
davidjonas opened this issue May 8, 2013 · 8 comments

Comments

@davidjonas
Copy link

I had a bunch of lightboxes with an iframe inside in 0.9.2 and now (with 0.10.0) they do not show the iframe anymore. Instead they show the first image that is used to trigger the lightbox that is supposed to not be included on the lightbox because it has class "no-lightbox".

The desired behaviour (That works well in 0.9.2) is to have an image on the article that when clicked it will open a lightbox with an iframe poiting to anothe page that renders a slideshow.

You can see the production site that is working fine with 0.9.2 (except in FF of course) at http://jaarverslag.zeeuwsmuseum.nl/

If you browse through the articles you will see some images with a "Slideshow" button that opens the lightbox with the iframe. Now, with 0.10.0 it just shows the same image with the same slideshow button inside the lightbox.

What were the changes to the lightbod rendering? Is there any documentation on that?

@pph7
Copy link

pph7 commented May 10, 2013

Did you check out

https://github.com/Treesaver/treesaver/wiki/LightBox

otherwise I can only try to help you when I see a live preview of the site
with the problems.

Sorry!
Mark

@davidjonas
Copy link
Author

Hi! :) Thanks for the reply. I read the docs but there is nothing that hints on what the difference might be. This is the same document I followed to create the slideshow in the first place in 0.9.2. I did not change anything on either the content, the resources o any code except switching the treesaver.js to the 0.10.0 version.

Unfortunately at the moment I reverted the development server back to 0.9.2 because we are preparing for a release. So I don't have an instance running with the problem right now.

I will come back to this as soon as the release is done. In the meanwhile, if somebody knows anything about any changes to the "zoomable" or lightbox feature from 0.9.2 to 0.10.0 then I would be really grateful for a heads up.

Thanks a lot.

@pph7
Copy link

pph7 commented May 15, 2013

I am working on a Treesaver project too. If you are interested to exchange
thoughts about the framework, just send me a mail.
Greetings,
Mark

@davidjonas
Copy link
Author

Hi!

I advanced the development server back to 0.10.0 so I can send you the example of the problem.

This is a page with 0.9.2 (works as expected when you click "Slideshow"):
http://jaarverslag.zeeuwsmuseum.nl/article/soort-van-steen

This is the same page with 0.10.0 (does not show the slideshow as it is supposed to):
http://dev.intk.com:9081/2011/article/soort-van-steen

The slideshow should be included on an iframe inside the lightbox. The URL of the slideshow that should be loaded into the iframe is:
http://dev.intk.com:9081/slideshow/SoortVanSteen (this is also using 0.10.0)

I am interested on how you are using treesaver. I have integrated it in Django to be able to more easily manage the content. I will email you about this so we can exchange some ideas.

Thanks a lot for the help!

@davidjonas
Copy link
Author

I think it relates to this feature #105
I think it was removed somehow on 0.10.0

@andreacampi
Copy link
Member

I don't think this was removed, at least not voluntarily.
I'm wondering if it has anything to do with this being an tag.

I will investigate over the weekend.

@andreacampi
Copy link
Member

I see what's happening, and I think 0.10.0 is doing the right thing.

tl;dr: replace

<object data-sizes="slideshow-large">

with

<object data-sizes="lightbox">

That should fix it.

Long story: in 0.9.x we picked the "best" size to show in the lightbox by looking at the sides of the rectangle, whereas in 0.10.x we use the area, which is a better approximation.
Moreover in 0.9.x we heavily favored sizes with no min-height or min-width; that was a bad idea, and caused non-obvious results.
And that's exactly why it was working in 0.9.x--a lucky accident.

BTW you have class="no-lightbox" but that doesn't do anything--you might as well drop it.

@davidjonas
Copy link
Author

Thanks a lot, That's exactly what I needed. Everything is working properly now.

:) Great! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants