I don''t tend to have much to do with front-end stuff, but I need to demo some ajaxy popup modal forms in a Rails 2.3 app (with Prototype). Googling around gets me a few options... but nothing obviously *the one*. http://www.methods.co.nz/popup/popup.html http://prototype-window.xilinus.com/ Anyone out there using or used something they can recommend? My main demand is to pop up a form that will be populated by an ajax call (I don''t really want to render "display:none;" all the possible forms, and show relevant ones when clicked) TIA -- 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.
On Aug 21, 1:50 pm, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyone out there using or used something they can recommend?No one? Oh well... I''ll have to muddle through manually :-( -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Michael Pavling wrote in post #1017715:> ... > My main demand is to pop up a form that will be populated by an ajax > call (I don''t really want to render "display:none;" all the possible > forms, and show relevant ones when clicked)A simple way to ''disable'' all visible stuff is to put a (transparent) div over the whole ''screen'' and to put the ''modal form'' above (inside or after) that. Hope this helps, T. -- 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.
jQuery dialog is your friend. -- 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.
On 25 August 2011 00:32, FredO <sinobra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> jQuery dialog is your friend.It''s not friendly to me - I''m limited to Prototype methods for this :-( -- 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.
On 24 August 2011 18:07, T. N. T. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Michael Pavling wrote in post #1017715: >> ... >> My main demand is to pop up a form that will be populated by an ajax >> call (I don''t really want to render "display:none;" all the possible >> forms, and show relevant ones when clicked) > > A simple way to ''disable'' all visible stuff is to put a (transparent) > div over the whole ''screen'' and to put the ''modal form'' above (inside or > after) that.Yeah, I get the general gist, it''s the exact implementation with Rails that I''m curious about. Do I use RJS to update the page, or do I do remote_link_to with the :update parameter set? How do I structure the controller to show and then hide again? Stuff like that... -- 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.
On Aug 25, 2011, at 9:28 AM, Michael Pavling wrote:> On 24 August 2011 18:07, T. N. T. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> Michael Pavling wrote in post #1017715: >>> ... >>> My main demand is to pop up a form that will be populated by an ajax >>> call (I don''t really want to render "display:none;" all the possible >>> forms, and show relevant ones when clicked) >> >> A simple way to ''disable'' all visible stuff is to put a (transparent) >> div over the whole ''screen'' and to put the ''modal form'' above >> (inside or >> after) that. > > Yeah, I get the general gist, it''s the exact implementation with Rails > that I''m curious about. > Do I use RJS to update the page, or do I do remote_link_to with the > :update parameter set? How do I structure the controller to show and > then hide again? > Stuff like that...Take a look at Ryan Johnson''s Control.Modal (maybe renamed to Control.Window) widget for an extremely well-thought-out (prototype.js) modal dialog. As far as how to invoke it from Rails, the rule of unobtrusive scripting is that first you make sure that it works without any script. Normal controller paths FTW! Then use the respond_to handlers to make sure that you only render the partial for your form (no layout) when the request is :xhr. Read Ryan''s extensive documentation for examples of how to request a path, but hijack it into a modal overlay instead of rendering into the entire window. You can decorate your login form with the Ajax behavior like this: //application.js document.observe(''dom:loaded'',function(){ $(''my_login_form'').observe(''submit'',function(evt){ evt.stop(); this.request(); }); }); Everything else should just work. Walter> > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en > . >-- 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.