Quote:
Originally Posted by jiggy Hi Kevin,
Thanks for the reply.
As mentioned in my previous post, i have a scenario of the following kind:
In an email message body there would be some content,right-clicking on which will pop-up a form to the user to fill up and then save that information somewhere.
So can you please help me in making me understand how i can achieve this thing through zimlets.Also request you to provide me some references regarding coding zimlets.
Thanks. |
As long as you don't care if the form comes from a server, this is pretty trivial. There are two xml files in each zimlet. The config_template.xml defines global properties (such as urls) and the name of the zimlet. the "name of the zimlet".xml file contains what strings to search for.
A config like this would automatically open a floating tooltip window over a string that matched a specific regex to add a form.
Code:
<zimlet name="org_technicaldetails_tasks" version="1.0" description="Tasks">
<contentObject>
<matchOn>
<regex attrs="ig">(your regex string here)</regex>
</matchOn>
<toolTip>
<actionUrl target="http://www.myserver.org/tasks/view/" >
<param name="id">${src.$1}</param>
</actionUrl>
</toolTip>
</contentObject>
</zimlet> Your regex string is how you specify where the id is. The form (in my case at
www.myserver.org/) will pop up inside of a tooltip window.
If you want a full window, instead of wraping it inside of toolTip, wrap it inside of a <canvas>. If you need a form look at <formEditor>.
Hope this helps.