留言板
Open popup in response using java[RESOLVED]
Rishi Dev Gupta,修改在12 年前。
Open popup in response using java[RESOLVED]
Expert 帖子: 255 加入日期: 08-11-23 最近的帖子
I am looking to cusomize a popup screens.
Say a feedback form comes in popup. Using Liferay.popup script i can open it easily, but to make it friendly url something like "http://localhost:9090/portal/popup/feedback". So wherever i put this link in anchor <a href="http://localhost:9090/portal/popup/feedback" > feedback</a> it should respond with a liferay popup keeping me on the same screen is that possible in liferay or anybody have worked on achieving this. Kindly share your knowledge
thanks.
Rishi
Say a feedback form comes in popup. Using Liferay.popup script i can open it easily, but to make it friendly url something like "http://localhost:9090/portal/popup/feedback". So wherever i put this link in anchor <a href="http://localhost:9090/portal/popup/feedback" > feedback</a> it should respond with a liferay popup keeping me on the same screen is that possible in liferay or anybody have worked on achieving this. Kindly share your knowledge
thanks.
Rishi
Hi Rishi,
I hope you can achieve it Using Jquery dialog where you can define all attributes(Ex : Modal) & ofcourse it keeps you on same screen.Hope it helps.
Regards,
Anil Sunkari
I hope you can achieve it Using Jquery dialog where you can define all attributes(Ex : Modal) & ofcourse it keeps you on same screen.Hope it helps.
Regards,
Anil Sunkari
Thanks Anil,
thats the easiest way usign jQuery or Liferay scripts.
But what i am talking here is to make the opening the popup user friendly, so that you don't need to be a programmer to code javascript or should know Liferay API. Its more of providing the ease of use to end user so that while editing web content he can just put a link and point to something "http://localhost:8080/portal/popup/feedback" and it goes to some struts action ot something and liferay modal popup appear with some content. Thats what i am looking to achieve.
thats the easiest way usign jQuery or Liferay scripts.
But what i am talking here is to make the opening the popup user friendly, so that you don't need to be a programmer to code javascript or should know Liferay API. Its more of providing the ease of use to end user so that while editing web content he can just put a link and point to something "http://localhost:8080/portal/popup/feedback" and it goes to some struts action ot something and liferay modal popup appear with some content. Thats what i am looking to achieve.
Ravi Kumar Gupta,修改在12 年前。
RE: Open popup in response using java
Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
It can be done.. one approach can be to write a reusable jquery/aui plugin. Give a particular class to the link which when clicked you want to open the popup. And an even to the link which will get the href of link and show in a popup. At the same time disable the general behavior of that particular link. There should be ajax call to get data from the link and show it in popup.
Add the plugin to page and then put the link with a class. It should work.
Add the plugin to page and then put the link with a class. It should work.
Thanks Ravi, Good approach worthy enough to have a go, I will look and update here.
Hi ,
I don't know whether you will like this or not. But I will try to do this like below.
Step 1:I will create a custom portlet .
Step 2: In portal-normal.vm I will call my portlet based on condition.
Step 3:In portlet I will use jquery UI to show my popup.
HTH
Kamal
I don't know whether you will like this or not. But I will try to do this like below.
Step 1:I will create a custom portlet .
Step 2: In portal-normal.vm I will call my portlet based on condition.
Step 3:In portlet I will use jquery UI to show my popup.
HTH
Kamal
Ravi Kumar Gupta,修改在12 年前。
RE: Open popup in response using java
Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Hi Kamal,
Somewhere we have to put the popup design html, you picked portal-normal.vm thats fine.. The code should be accessible to all other links in or out of portlets. A code deployed in theme will be available to whole page. I did not use JQuery UI but if that works without writing any extra html then just include the jquery-ui and some more javascript, which should work fine. No need to go for a portlet.
Correct me if I am wrong.
-Ravi
Somewhere we have to put the popup design html, you picked portal-normal.vm thats fine.. The code should be accessible to all other links in or out of portlets. A code deployed in theme will be available to whole page. I did not use JQuery UI but if that works without writing any extra html then just include the jquery-ui and some more javascript, which should work fine. No need to go for a portlet.
Correct me if I am wrong.
-Ravi
Hi Ravi,
You are right but it will be useful to keep an application which can be concentrated at one location so that it can be used for multiple projects as a reusable component .
Thanks
KamalKant
You are right but it will be useful to keep an application which can be concentrated at one location so that it can be used for multiple projects as a reusable component .
Thanks
KamalKant
Rishi Dev Gupta,修改在12 年前。
RE: Open popup in response using java [RESLVED]
Expert 帖子: 255 加入日期: 08-11-23 最近的帖子
I am able to get it working
Simple assign a class attribute to all the anchor tags with in page.
Now using jquery bind the click event on the anchor with above assigned class to open a feedback popup
Simple as that!!!
Simple assign a class attribute to all the anchor tags with in page.
Now using jquery bind the click event on the anchor with above assigned class to open a feedback popup
Simple as that!!!
Ravi Kumar Gupta,修改在12 年前。
RE: Open popup in response using java
Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Cool Rishi!!!
Would appreciate if you can convert it to a plugin and share with a wiki page on some website. That way it will help a lot of ppl looking for similar solution.
Thanks and Regards
Ravi
Would appreciate if you can convert it to a plugin and share with a wiki page on some website. That way it will help a lot of ppl looking for similar solution.
Thanks and Regards
Ravi
Sure Ravi, will post it somewhere static and accessible for all.
Later will update here too.
Later will update here too.
Ravi Kumar Gupta,修改在12 年前。
RE: Open popup in response using java
Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Thanks a lot for that.. waiting for the link
Here is the location where i have added the details
http://rishidevgupta.blogspot.com/2011/08/liferay-open-liferay-popup-in-web.html
http://rishidevgupta.blogspot.com/2011/08/liferay-open-liferay-popup-in-web.html
Ravi Kumar Gupta,修改在12 年前。
RE: Open popup in response using java[RESOLVED]
Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
I get this message.
This blog is open to invited readers only
http://rishidevgupta.blogspot.com/
It doesn't look like you have been invited to read this blog. If you think this is a mistake, you might want to contact the blog author and request an invitation.
Can see the blog.. :|
This blog is open to invited readers only
http://rishidevgupta.blogspot.com/
It doesn't look like you have been invited to read this blog. If you think this is a mistake, you might want to contact the blog author and request an invitation.
Can see the blog.. :|
Rishi Dev Gupta,修改在12 年前。
RE: Open popup in response using java[RESOLVED]
Expert 帖子: 255 加入日期: 08-11-23 最近的帖子
Necessary correction done.