First version of the tooltips widget
Posted by Paolo Sat, 13 Oct 2007 17:48:00 GMT
Hey guys, today I’ve got a little gift for you! A new widget is ready to be tested by the crowd: Tooltips!
So you want to write something like this:
My first tooltip:
<% tooltip do %>
<b>Woot, woot, woot!</b><br/>
Wow, those lousy tooltips are finally ready!<br/>
<% end %>
And get something like this:

All this goodness is available to you just doing:
ruby script/plugin install svn://svn.seesaw.it/widgets/trunk
Btw, there is some magic happening here, let’s see:
- Where is the question mark image taken from? It’s automatically copied into your public/images/widgets folder during plugin installation!
- Where is the javascript file that handles everything taken from? It’s automatically copied into your public/javascripts/widgets folder during installation, and you don’t even need to include it with
javascript_include_tagbecause I’ve hacked it for you! - Where’s the CSS? It’s automagically inlined in your HTML, you can customize it of course.
It’s an early stage release so please report any bug you will find.
NB: As I said some code gets executed on plugin installation so please install with script/plugin install, just unpacking the plugin under vendor/plugins doesn’t work as expected (you’ll miss necessary images and javascripts).
Have fun!




cool, it’s easy to use.
I’ll introduce your widget in Traditional Chinese and I’ll use it on my rails app. some other days. :p
I’d love to use this but is there any way you could update it to not require ERB blocks? I’d like to be able to use with a helper my app relies on:
Any chance you can make this widget work in straight Ruby?module ApplicationHelper def balloon_tip(name) content = BalloonTip.find_by_name(name).content tooltip { content } end endI use Piston to manage plugins and it doesn’t run the install hook. I added this rake task in the widgets plugin. You could add it to your codebase:
file: vendor/plugins/widgets/tasks/widgets_tasks.rakeAfter loading the plugin with Piston I can then just run this task:
Hiya. I love the plugin.
Here’s the behaviour I couldn’t figure out:
I’d like to have tabs highlighted when they are on a different controller. Here’s an example:
I have two controllers: food and recipes
Food is a tab
But if you are in the recipes controller, I would still like to have the Food tab highlighted.
is this possible? Sanjay
Hi,
In using this tool tip widget I encounter the following problem: how do I extend it so one doesn’t have to click on the tooltip icon but can get a tooltip by simply mousovering the icon?