I wrote something like this for Prototype a while back: http://github.com/toretore/experiments/blob/b1b1a93370762cf95ff50254c6cf84fe143d6368/unobtrusive-rails/public/javascripts/application.js
Example HTML here: http://github.com/toretore/experiments/tree/b1b1a93370762cf95ff50254c6cf84fe143d6368/unobtrusive-rails/app/views/horses It might not be exactly what's imagined in this thread, but it might provide some ideas or be of use otherwise. It works quite well up until a point where the complexity doesn't allow you to be completely unobtrusive and not have to write JavaScript. A hacked in some rather ugly solutions where you can add onFoo handler code by putting them in custom attributes, but you'd probably be better off just writing the JS yourself at this point. The JS is written to be modular and reusable so for example you can instantiate a Rails.RemoteForm manually and customise it. Tore On Jan 29, 6:34 pm, Erwan Barrier <[email protected]> wrote: > > So Rails should never really generate any JS for these helpers. Just > > decorate them with the proper class names/attributes. > > Ok, I'll start working on this in the next few days and keep you > updated on the progress. > > > Obviously, I like that too - otherwise I wouldn't have made the > > suggestion half a year ago! :-) Make sure that you contact me as soon > > as something's decided - I'd be happy to help implementing this! > > Clemens, your help is welcome, I contact you as soon as I have free > time to work on this. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
