Ruby on Rails - navigation tree

X

Xenia

Hi, folks,

I am trying to build a beautiful navigation tree, to help users browse
through an inherently hierarchical website. Looking for the
appropriate control, I chose the yui treeview (javascript). There is a
site describing how to adjust it to Ruby on Rails
(http://sonjayatandon.com/07-2006/how-to-get-rails-and-the-yahoo-user-interface-yui-to-talk-part-1/
etc.).
I also want to add a custom right-click context menu
(http://developer.yahoo.com/yui/examples/menu/treeviewcontextmenu.html).
I followed the directions, and they work OK, however, it does not
escape my attention that I am using Ruby to hardcode javascript. Is
there another, more elegant, way to do this?

Thanks,
Xenia , new to Ruby and Rails
 
R

Roger Pack

I also want to add a custom right-click context menu
(http://developer.yahoo.com/yui/examples/menu/treeviewcontextmenu.html).
I followed the directions, and they work OK, however, it does not
escape my attention that I am using Ruby to hardcode javascript. Is
there another, more elegant, way to do this?

You could include it as a separate .js file
http://www.google.com/search?client...de+a+js+file&sourceid=opera&ie=utf-8&oe=utf-8

Note also that the rails group might be more helpful since some of us on
this list don't use rails as often as they.
=r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top