Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Benjamin Linder
enlarge images onclick
April 28, 2009 2:56 AM
Answer

Benjamin Linder

Rank: New Member

Posts: 7

Join Date: March 5, 2009

Recent Posts

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 ...
István Benedek
RE: enlarge images onclick
November 3, 2009 4:14 AM
Answer

István Benedek

Rank: New Member

Posts: 10

Join Date: August 21, 2009

Recent Posts

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
Lisa Simpson
RE: enlarge images onclick
November 3, 2009 7:46 AM
Answer

Lisa Simpson

Rank: Liferay Legend

Posts: 2034

Join Date: March 5, 2009

Recent Posts

Depending on what you're doing, you can put that javascript on your page.
István Benedek
RE: enlarge images onclick
November 3, 2009 7:59 AM
Answer

István Benedek

Rank: New Member

Posts: 10

Join Date: August 21, 2009

Recent Posts

Sure.. just you know, I'm a lazy guy.. So, if somebody would offer an existing solution...
Jan Tošovský
RE: enlarge images onclick
June 2, 2011 1:44 AM
Answer

Jan Tošovský

Rank: Expert

Posts: 424

Join Date: July 22, 2010

Recent Posts

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ý
RE: enlarge images onclick
June 2, 2011 4:31 AM
Answer

Jan Tošovský

Rank: Expert

Posts: 424

Join Date: July 22, 2010

Recent Posts

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
Jquery failing when using in PORTLET
June 29, 2011 1:47 AM
Answer

Joe Veliyath

Rank: New Member

Posts: 3

Join Date: June 29, 2011

Recent Posts

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
RE: Jquery failing when using in PORTLET
June 30, 2011 6:07 AM
Answer

Joe Veliyath

Rank: New Member

Posts: 3

Join Date: June 29, 2011

Recent Posts

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.