-
Notifications
You must be signed in to change notification settings - Fork 754
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
LightBox: Support descendant image links in addition to direct children #5247
Comments
It's tricker than that. This line.. this.links = this.jq.children(':not(.ui-lightbox-inline)'); Is returning DIV's instead of anchor "A" like it is when there is no wrapper div. |
@stolp i know this is old but don't you want to use the new Galleria instead in FullScreen mode instead of Lightbox? https://www.primefaces.org/showcase/ui/multimedia/galleria/fullscreen.xhtml I think then you can have DIV's or more control over the display of content? |
And it has "caption" support to show the text I think you were trying to display? https://www.primefaces.org/showcase/ui/multimedia/galleria/caption.xhtml |
@melloware thanks for bringing that up again! I added some screenshots to illustrate my use case. The attachment list is generated via ui:repeat and is located inside the p:lightbox, thus my initial request for including descendant elements as well. Looking back with 2.5 more years of experience I think I potentially can go for a different approach here indeed. The basic idea would be to add p:overlayPanels to each thumbnail, each containing a p:galleria starting at a different index. Other ideas are welcome. It is a bit more of an effort, but may be a good replacement. So if you feel inclined to close this feature request (I bet you do), please feel free to go ahead. |
Yep I am checking to see if Lightbox should be deprecated with a PrimeTek as Galleria does everything that Lightbox does. Thanks for your feedback! |
1) Environment
2) Expected behavior
Per documentation LightBox expects the image links it displays as direct children of the p:lightBox element:
I suggest to enhance the collection of image links to all descendant elements, so that the for example the following example works as well:
In my case, I generate a list of preview image attachments links including additional textual information (left out in the example) vi< ui:repeat which I like to present via LightBox.
3) Actual behavior
The current behavior forbids putting more complex output inside a p:lightBox. This limits the usefulness of the implementation.
4) Steps to reproduce
See above
5) Suggested solution
I think the code in question is located in the setupImaging function in lightbox.js:
As my Javascript skills are severely limited I feel I cannot provide an adequate PR here.
The text was updated successfully, but these errors were encountered: