Am adding to a sortable list using Ajax, and to get the Scriptaculous
effects to kick in after the add, the only way I have found is by
re-executing sortable_element.
Can anyone suggest a better way of doing this, as the eval in here is
not good.
<%= link_to_remote "Add",
:url => { :controller => "pages", :action =>
"add_fragment", :pid =>
pid, :index_size => index_size, :fid => fid },
:complete => "eval(decodeURIComponent(#{sortable_element
''frag_list'', :url => sort_frag_pages_path, :complete =>
visual_effect(:highlight, ''frag_list''), :handle =>
''handle''}).gsub(''//'',''''));"
%>
Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.