thanks
$$('a.action').each(function(item)
{
if(item.className == 'show action')
{
item.action_link.open();
}
});
You can create a JS function with that code, and attach it to onclick event:
Event.observe('action_link_id', 'click', your function);
Or you can set that code as action response, and set :position false to that
action link:
config.action_links.add 'action_name', :label => 'Text', :type => :table,
:position => false
And create a view named action_name.js.rjs:
page << %|
$$('a.action.show').each(function(item) {
item.action_link.open();
});
|
>
> On Dec 31, 9:34 am, Tracy <tracy.har...@gmail.com> wrote:
> > Is there a way to expand (or close) all inline nested records in a
> > displayed list?
> >
> > thanks
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send
> email to actives...@googlegroups.com. To unsubscribe from this group,
> send email to activescaffol...@googlegroups.com. For more
> options, visit this group at
> http://groups.google.com/group/activescaffold?hl=en.
--
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com
For completeness, close_all.rjs works fine, too:
page << "$$('a.action.show').each(function(item)
{ item.action_link.close(); });"
On Jan 4, 12:57 am, "Sergio Cambra .:: entreCables S.L. ::."