I want to be able to call an action after performing an edit using the in-place editor macro. I want to update multiple divs so I was thinking about using an RJS template. However, I can''t figure out how to trigger another action after the method created by in_place_edit_for runs. Is there is an option on Ajax.InPlaceEditor where I can inject some Element.update calls? Thanks, Shane
I want to be able to call an action after performing an edit using the in-place editor macro in Rails. I want to update multiple divs so I was thinking about using an RJS template. However, I can''t figure out how to trigger another action after the method created by in_place_edit_for runs. Is there is an option on Ajax.InPlaceEditor where I can inject some Element.update calls? Or is there a more straight forward way? Thanks, Shane
take a look at his post, it was a geat help for me http://shnoo.gr/articles/2005/12/20/ajax-the-great On 1/18/06, Shane Vitarana <shanev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I want to be able to call an action after performing an edit using the > in-place editor macro in Rails. I want to update multiple divs so I > was thinking about using an RJS template. However, I can''t figure out > how to trigger another action after the method created by > in_place_edit_for runs. Is there is an option on Ajax.InPlaceEditor > where I can inject some Element.update calls? Or is there a more > straight forward way? > > Thanks, > Shane > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Roberto Saccon - http://rsaccon.com _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Roberto, Thanks for pointing me in the right direction. I solved my problem and blogged about it here: <http://www.shanesbrain.net/articles/2006/01/19/in-place-editor-with-rjs-templates>. Shane Vitarana On 1/18/06, Roberto Saccon <rsaccon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> take a look at his post, it was a geat help for me > > http://shnoo.gr/articles/2005/12/20/ajax-the-great > > > On 1/18/06, Shane Vitarana <shanev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I want to be able to call an action after performing an edit using the > > in-place editor macro in Rails. I want to update multiple divs so I > > was thinking about using an RJS template. However, I can''t figure out > > how to trigger another action after the method created by > > in_place_edit_for runs. Is there is an option on Ajax.InPlaceEditor > > where I can inject some Element.update calls? Or is there a more > > straight forward way? > > > > Thanks, > > Shane > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > -- > Roberto Saccon - http://rsaccon.com > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >
Hi Shane, Did you ever find an answer to this ? I''m stuck with the same problem. Thanks, Jeroen Shane Vitarana wrote:> I want to be able to call an action after performing an edit using the > in-place editor macro. I want to update multiple divs so I was > thinking about using an RJS template. However, I can''t figure out how > to trigger another action after the method created by > in_place_edit_for runs. Is there is an option on Ajax.InPlaceEditor > where I can inject some Element.update calls? > > Thanks, > Shane > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > . > >
found a way, but after the function call, the field isn''t editable
anymore ..
<%= in_place_editor_field :appointment, ''description'', {},
{:rows => 3,
:cols => 20 , :options => "{onComplete: refresh_app}" } -%>
the "onComplete: refresh_app " does the trick, but it''s not
usable
because afterwards it isn''t editable anymore.
Somebody else ?
Regards,
Jeroen
Jeroen van Doorn wrote:> Hi Shane,
>
> Did you ever find an answer to this ?
> I''m stuck with the same problem.
>
> Thanks,
> Jeroen
>
> Shane Vitarana wrote:
>> I want to be able to call an action after performing an edit using the
>> in-place editor macro. I want to update multiple divs so I was
>> thinking about using an RJS template. However, I can''t figure
out how
>> to trigger another action after the method created by
>> in_place_edit_for runs. Is there is an option on Ajax.InPlaceEditor
>> where I can inject some Element.update calls?
>>
>> Thanks,
>> Shane
>> _______________________________________________
>> Rails mailing list
>> Rails@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>> .
>>
>>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>