Fórum

RE: enlarge images onclick

Benjamin Linder, modificado 14 Anos atrás.

enlarge images onclick

New Member Postagens: 6 Data de Entrada: 06/03/09 Postagens Recentes
Hi everyone...
I'm searching for a way to enlarge my images onclick. I know i can add a link to an image that opens a bigger one in a new window but i want to show the new one in the same window.
I need something like lightbox that works with liferay's image library. And adding images to a web content should be user friendly ... mb I can use templates for this.

Is there already a way to enlarge images in liferay ??

thanks for help ...
istvan benedek, modificado 14 Anos atrás.

RE: enlarge images onclick

New Member Postagens: 10 Data de Entrada: 21/08/09 Postagens Recentes
Hey Benjamin,

I have the same issue, I am about to find a 3rd party image gallery which is already integrated with Liferay...

In the mean time , did you figure out something? Or could you give a hint ? (flash or js)

Istvan
thumbnail
Lisa Simpson, modificado 14 Anos atrás.

RE: enlarge images onclick

Liferay Legend Postagens: 2034 Data de Entrada: 05/03/09 Postagens Recentes
Depending on what you're doing, you can put that javascript on your page.
istvan benedek, modificado 14 Anos atrás.

RE: enlarge images onclick

New Member Postagens: 10 Data de Entrada: 21/08/09 Postagens Recentes
Sure.. just you know, I'm a lazy guy.. So, if somebody would offer an existing solution...
Jan Tošovský, modificado 12 Anos atrás.

RE: enlarge images onclick

Liferay Master Postagens: 566 Data de Entrada: 22/07/10 Postagens Recentes
I have quite narrow column for my content and I plan set the overflow property to auto to all the images (they can be scrolled if they are wider). They would be clickable so user could display them complete without scrolling if necessary.
I plan to put that javascript into every liferay page.
But I'd like to ask.
1) isn't there already some javascript method available for this to be used directly in my html code (i.e. calling known function on mouse click)
2) if not, do you have any experience with any library for this (lightbox-like) which is harmfull to the rest of javascript code?

Jan
Jan Tošovský, modificado 12 Anos atrás.

RE: enlarge images onclick

Liferay Master Postagens: 566 Data de Entrada: 22/07/10 Postagens Recentes
I've found answer partially in this blog http://www.liferay.com/web/nathan.cavanaugh/blog/-/blogs/using-jquery-or-any-javascript-library-in-liferay-6-0
In my case I can link necessary libraries in my custom portlet.
And if a lightbox clone for YUI is used, it is sufficient to link just 7kB JavaScript library (+css) in the header (gallery-lightbox-min.js) - http://yuilibrary.com/gallery/show/lightbox.
The only problem is referencing to images in form '/c/wiki/get_page_attachment?nodeId=12816&fileName=SharedImages%2Fimage.png' as they cannot be displayed this way. But this is for another thread.
Joe Veliyath, modificado 12 Anos atrás.

Jquery failing when using in PORTLET

New Member Postagens: 3 Data de Entrada: 29/06/11 Postagens Recentes
Hi Guys, I am a having a peculiar problem.I was trying out TABS of JQUERY in liferay. I build a new portlet to get this functionality. The good news was that the TABS worked when i added the portlet.But When i refresh the page,its not working. Why is that happening ?
P.S I have used the same example as in JQUERY tabs DEMO.
Joe Veliyath, modificado 12 Anos atrás.

RE: Jquery failing when using in PORTLET

New Member Postagens: 3 Data de Entrada: 29/06/11 Postagens Recentes
Joe Veliyath:
Hi Guys, I am a having a peculiar problem.I was trying out TABS of JQUERY in liferay. I build a new portlet to get this functionality. The good news was that the TABS worked when i added the portlet.But When i refresh the page,its not working. Why is that happening ?
P.S I have used the same example as in JQUERY tabs DEMO.



Looks like i found solution to the problem...

I was because of the order in which we give the .js files in the portlet.xml file.Always give smaller .js files like "jquery.core.js" first followed by "jquery.all.js"..
Always give child Js Files first.

Hope this helps someone.