Thanks Sergio.. That's basically what I ended up with.
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. ::."
<[email protected]> wrote:
> On Jueves, 31 de Diciembre de 2009 20:39:22 Tracy escribió:
>
> > This bit of js opens them all, but i'm not quite sure how to tie it
> > into a table action link:
>
> > $$('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 <[email protected]> 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 [email protected]. To unsubscribe from this group,
> > send email to [email protected]. 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) [email protected]
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.