[dev] Broken tooltip.js
Jason Clifton
jason at citydiesel.net
Wed Nov 1 20:14:46 PST 2006
Thanks for the help Chuck that worked great.
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Quoting Jason Clifton <jason at citydiesel.net>:
>
>> Not sure if this is the correct list...
>
> This list is fine for development questions in general.
>
>> I've been working on converting the nag panel.inc to ajax, sort of
>> like the kronolith one. I added 1 function to panel.inc listed
>> below and a <div> labeled all just below the </head> tag on
>> common-headers.inc and a </div> at the end of /list/task_footers.inc
> Right. The tooltips attach to elements of the DOM. By doing a
> partial refresh using ajax, you're modifying the DOM and introducing
> new elements that need to be modified by the tooltip behavior. So
> the only step you're missing is re-applying the behavior to the new
> DOM elements. In Kronolith, this is accomplished with this code
> after the update:
>
> if (typeof ToolTips == 'object') {
> ToolTips.out();
> ToolTips.attachBehavior();
> }
>
> Something very similar to that after your handler updates the div
> should work (but you need to make sure it happens onComplete of the
> Ajax.Updater, you can't just call it on the next line because of the
> nature of asynchronous call).
>
> -chuck
--
Jason Clifton
City Diesel
www.citydiesel.net
More information about the dev
mailing list