[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Checkbox TreeView availability ?

mike courtney

7/13/2006 4:57:00 PM

Does anyone know of a RoR implementation of a TreeView in which you can
navigate to leafs of branches and select multiple leafs of interest via
checkboxes. An example of this is the javascript Checkbox Tree available
at http://www.treeview.net/treemenu/3fr_che.... It is also nice
to be able to open all or close all branches via a button, and to select
all leafs or unselect all of them.

I would rather not have to build this from scratch as I have plenty of
other RoR work that I want to do. Thanks for any solid leads on this
subject.

Regards,
Mike

--
Posted via http://www.ruby-....

4 Answers

Jim Morris

7/13/2006 6:39:00 PM

0

I did something like this, which I describe in this blog entry.

http://blog.w.../articles/2006/05/20/role-based-authentication-...

It is simple, and I have seen the set all and clear all implemented in java script,
I'll try to dig that up and add it to the blog.



mike courtney wrote:
> Does anyone know of a RoR implementation of a TreeView in which you can
> navigate to leafs of branches and select multiple leafs of interest via
> checkboxes. An example of this is the javascript Checkbox Tree available
> at http://www.treeview.net/treemenu/3fr_che.... It is also nice
> to be able to open all or close all branches via a button, and to select
> all leafs or unselect all of them.
>
> I would rather not have to build this from scratch as I have plenty of
> other RoR work that I want to do. Thanks for any solid leads on this
> subject.
>
> Regards,
> Mike
>

--
Jim Morris, http://blog.w...

Eric Hodel

7/13/2006 6:44:00 PM

0

On Jul 13, 2006, at 9:56 AM, mike courtney wrote:

> Does anyone know of a RoR implementation [...]

Please ask Rails questions on the Rails mailing lists.

http://lists.rubyon...

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...



mike courtney

7/15/2006 4:04:00 PM

0

Jim Morris wrote:
> I did something like this, which I describe in this blog entry.
>
> http://blog.wolfman.com/articles/2006/05/20/role-based-authentication-...
>
> It is simple, and I have seen the set all and clear all implemented in
> java script,
> I'll try to dig that up and add it to the blog.

Thank you for the information Jim. Pls let me know if/when you add it to
the blog.

Cheers.

--
Posted via http://www.ruby-....

Jim Morris

7/17/2006 7:43:00 AM

0

I added the entry to my blog, it looks like this...

This is done with a little bit of javascript.

The view code looks like...


<a href="#" onclick="checkAll('permissions_<%= controller_id %>[]'); return false;"\>all&lt;/a>
<a href="#" onclick="uncheckAll('permissions_<%= controller_id %>[]'); return false;"\>none&lt;/a>

The java script is...

function checkAll(name)
{
boxes = document.getElementsByName(name)
for (i = 0; i < boxes.length; i++)
boxes[i].checked = true ;
}

function uncheckAll(name)
{
boxes = document.getElementsByName(name)
for (i = 0; i < boxes.length; i++)
boxes[i].checked = false ;
}


mike courtney wrote:
> Jim Morris wrote:
>> I did something like this, which I describe in this blog entry.
>>
>> http://blog.w.../articles/2006/05/20/role-based-authentication-...
>>
>> It is simple, and I have seen the set all and clear all implemented in
>> java script,
>> I'll try to dig that up and add it to the blog.
>
> Thank you for the information Jim. Pls let me know if/when you add it to
> the blog.
>
> Cheers.
>

--
Jim Morris, http://blog.w...