Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: [email protected] on June 21, 2010, 09:07:47 AM

Title: How to create a simple pop-up form
Post by: [email protected] on June 21, 2010, 09:07:47 AM
I have a plugin I've written that allows a user to automatically make a "task" out of an email in a custom built task management system I use.

Right now when a user clicks the plugin's "make a task" button, the task is automatically created.

I want to have it, instead of automatically creating, pop up a modal form that allows the user to add characteristics of the task.

I can't find anywhere a good explanation of how to pop up a simple modal form. I've tried to reverse engineer the modal form from the jquery calendar plugin and the modal form from the compose_addressbook plugin, without much success.

Can someone point to a resource for creating a simple modal popup in roundcube? Actually, it doesn't even have to be modal.

thanks,

chris
Title: How to create a simple pop-up form
Post by: SKaero on June 22, 2010, 04:30:55 AM
You just need to have your content in a div, then use jQuery to do the pop up.
Here is a simple tutorials that should work: How to generate simple pop up using Jquery - Stack Overflow (http://stackoverflow.com/questions/1328723/how-to-generate-simple-pop-up-using-jquery)
Title: How to create a simple pop-up form
Post by: [email protected] on June 22, 2010, 06:21:37 AM
Skaero,

Thanks, that tutorial will help a lot. It's also clarified for me what my central question is:

How do you append a div to the html output in roundcube? I'd like to just have an include php file that has all my content, and then run a line of code in my plugin initialization function that adds that include into one of the containers (?) or makes a container (?) on the mail screen.

Thanks,

Chris
Title: How to create a simple pop-up form
Post by: corbosman on June 22, 2010, 10:19:55 AM
You can use the render_page hook for example.