Forum: Ruby on Rails integration with movtable

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Da734ede01dc6e5bace38f5fbc0fc4f6?d=identicon&s=25 Kevin Tambascio (ktambascio)
on 2007-05-05 15:17
Hi,

I'm trying to integrate movtable to display some data. The file that
lists out the partials to display the data looks like this:

<html>
    <head>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
    <title>Movtable - List</title>
    <%= stylesheet_link_tag 'movtable' %>
  <%= sort_generateJS %>
    </head>
  <body onload="sortableInit()" onmousemove="mouseMove(event)"
onmouseup="mouseUp(event)">
    <%= render_partial '../../lib/movtable/table' %>
    <%= render_partial '../../lib/movtable/navigation' %>
    <%= render_partial '../../lib/movtable/filter' %>
  </body>
</html>

I want to use my own application.rhtml layout, but leaving this code
as-is replaces all of my standard layout code.  When I just use the
render_partial code it displays the data, but I also need to have the
onload, onmousemove, and onmouseup function calls for full
functionality.

I don't want to have the onload/onmousemove/onmouseup code handlers
running for every single view on my site (or I would add these event
handlers to application.rhtml), so I need a way to properly load the
event handlers only when this view is needed.

Any thoughts?  Thanks in advance.
This topic is locked and can not be replied to.