Hi everyone, Just a quick question to check if it''s worth submitting a patch for this enhancement - I''ve discovered when doing lots of AJAX work that the most common pattern I''ve encountered for using submit_to_remote and link_to_remote tags involves creating a hidden ''busy indicator'' (usually an animated gif) and adding js code in the :before and :complete options to hide and show the button and busy indicator at the beginning and end of the request. I''ve created a couple of useful helpers that automatically generate the tags for the submit button/link, the busy indicator and the related javascript, and was wondering if it''s worth sumitting an enhancement patch for? It''s very simple, but takes a lot of the repetition out of doing AJAX stuff. Cheers, -David Felstead
I''ve implemented the same thing for my own projects and you can pretty much move that pattern into the remote_function method to take care of any remote call. I allow the progress indicator to be optional and I have a seperate helper that allows the user to place the indicator wherever they want on the page. I''m not sure what solution you came up with, but my stuff works with the remote form helpers and like I mentioned above, the indicator can be placed anywhere the user likes. I wasn''t sure if it was core worthy or not, maybe plugin?? On 4/29/06, David Felstead <david.felstead@gmail.com> wrote:> Hi everyone, > > Just a quick question to check if it''s worth submitting a patch for > this enhancement - I''ve discovered when doing lots of AJAX work that > the most common pattern I''ve encountered for using submit_to_remote > and link_to_remote tags involves creating a hidden ''busy indicator'' > (usually an animated gif) and adding js code in the :before and > :complete options to hide and show the button and busy indicator at > the beginning and end of the request. > > I''ve created a couple of useful helpers that automatically generate > the tags for the submit button/link, the busy indicator and the > related javascript, and was wondering if it''s worth sumitting an > enhancement patch for? It''s very simple, but takes a lot of the > repetition out of doing AJAX stuff. > > Cheers, > > -David Felstead > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core >
To add a bit more to this, I also added some code to (optionally) disable a form while a remote call is in progress and re-enable it when the action is complete. This way a user can''t hammer away at a form that''s already been submitted. On 4/29/06, Andrew Kaspick <akaspick@gmail.com> wrote:> I''ve implemented the same thing for my own projects and you can pretty > much move that pattern into the remote_function method to take care of > any remote call. I allow the progress indicator to be optional and I > have a seperate helper that allows the user to place the indicator > wherever they want on the page. > > I''m not sure what solution you came up with, but my stuff works with > the remote form helpers and like I mentioned above, the indicator can > be placed anywhere the user likes. > > I wasn''t sure if it was core worthy or not, maybe plugin?? > > On 4/29/06, David Felstead <david.felstead@gmail.com> wrote: > > Hi everyone, > > > > Just a quick question to check if it''s worth submitting a patch for > > this enhancement - I''ve discovered when doing lots of AJAX work that > > the most common pattern I''ve encountered for using submit_to_remote > > and link_to_remote tags involves creating a hidden ''busy indicator'' > > (usually an animated gif) and adding js code in the :before and > > :complete options to hide and show the button and busy indicator at > > the beginning and end of the request. > > > > I''ve created a couple of useful helpers that automatically generate > > the tags for the submit button/link, the busy indicator and the > > related javascript, and was wondering if it''s worth sumitting an > > enhancement patch for? It''s very simple, but takes a lot of the > > repetition out of doing AJAX stuff. > > > > Cheers, > > > > -David Felstead > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > >
Hello David ! 2006/4/29, David Felstead <david.felstead@gmail.com>:> I've created a couple of useful helpers that automatically generate > the tags for the submit button/link, the busy indicator and the > related javascript, and was wondering if it's worth sumitting an > enhancement patch for? It's very simple, but takes a lot of the > repetition out of doing AJAX stuff.This is stuff for a plugin, no ? That's what plugins are for - extending core, while not polluting core with something that would not be useful to everyone. If the plugin is so useful that everyone downloads it, you can be pretty sure that it can be integrated into core. Bye ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
So David and Andrew, please post your code and we can start using it ! I''m often doing this exact task, but haven''t refactored this out yet. Help you, help me, be DRY :) On 4/29/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote:> > Hello David ! > > 2006/4/29, David Felstead <david.felstead@gmail.com>: > > I''ve created a couple of useful helpers that automatically generate > > the tags for the submit button/link, the busy indicator and the > > related javascript, and was wondering if it''s worth sumitting an > > enhancement patch for? It''s very simple, but takes a lot of the > > repetition out of doing AJAX stuff. > > This is stuff for a plugin, no ? That''s what plugins are for - > extending core, while not polluting core with something that would not > be useful to everyone. > > If the plugin is so useful that everyone downloads it, you can be > pretty sure that it can be integrated into core. > > Bye ! > -- > François Beausoleil > http://blog.teksol.info/ > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > >_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Ok, I''m sure we can do that for you. :) Hey David... fire me off an email and we can look into merging our solutions into a plugin and then releasing it to the masses. Hey Dylan... stay tuned. :) On 5/1/06, Dylan Stamat <dylans@gmail.com> wrote:> So David and Andrew, please post your code and we can start using it ! > I''m often doing this exact task, but haven''t refactored this out yet. Help > you, help me, be DRY :) > > > > > On 4/29/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote: > > > Hello David ! > > 2006/4/29, David Felstead <david.felstead@gmail.com>: > > I''ve created a couple of useful helpers that automatically generate > > the tags for the submit button/link, the busy indicator and the > > related javascript, and was wondering if it''s worth sumitting an > > enhancement patch for? It''s very simple, but takes a lot of the > > repetition out of doing AJAX stuff. > > This is stuff for a plugin, no ? That''s what plugins are for - > extending core, while not polluting core with something that would not > be useful to everyone. > > If the plugin is so useful that everyone downloads it, you can be > pretty sure that it can be integrated into core. > > Bye ! > -- > François Beausoleil > http://blog.teksol.info/ > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > >
Well, here''s my first draft of the remote plugin (after some feedback i''ll put it into a public svn repo)... http://www.redlinesoftware.com/remote_helpers.tgz Just tar -xzf into the plugins dir. I wrote the README up pretty quick, but I hope it makes sense. David (Felstead)... if you have anything similar or improvements on this, I''d be happy to integrate them. Dylan... take a look and let me know if this looks useful to you. Thanks, Andrew On 5/1/06, Andrew Kaspick <akaspick@gmail.com> wrote:> Ok, I''m sure we can do that for you. :) > > Hey David... fire me off an email and we can look into merging our > solutions into a plugin and then releasing it to the masses. > > Hey Dylan... stay tuned. :) > > On 5/1/06, Dylan Stamat <dylans@gmail.com> wrote: > > So David and Andrew, please post your code and we can start using it ! > > I''m often doing this exact task, but haven''t refactored this out yet. Help > > you, help me, be DRY :) > > > > > > > > > > On 4/29/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote: > > > > > Hello David ! > > > > 2006/4/29, David Felstead <david.felstead@gmail.com>: > > > I''ve created a couple of useful helpers that automatically generate > > > the tags for the submit button/link, the busy indicator and the > > > related javascript, and was wondering if it''s worth sumitting an > > > enhancement patch for? It''s very simple, but takes a lot of the > > > repetition out of doing AJAX stuff. > > > > This is stuff for a plugin, no ? That''s what plugins are for - > > extending core, while not polluting core with something that would not > > be useful to everyone. > > > > If the plugin is so useful that everyone downloads it, you can be > > pretty sure that it can be integrated into core. > > > > Bye ! > > -- > > François Beausoleil > > http://blog.teksol.info/ > > > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > > > > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > >
Hey Andrew - sorry, been busy :) I''ll take a look and see if there''s anything useful I can add. Cheers! -DF On 5/2/06, Andrew Kaspick <akaspick@gmail.com> wrote:> Well, here''s my first draft of the remote plugin (after some feedback > i''ll put it into a public svn repo)... > http://www.redlinesoftware.com/remote_helpers.tgz > > Just tar -xzf into the plugins dir. > > I wrote the README up pretty quick, but I hope it makes sense. > > David (Felstead)... if you have anything similar or improvements on > this, I''d be happy to integrate them. > > Dylan... take a look and let me know if this looks useful to you. > > Thanks, > Andrew > > > On 5/1/06, Andrew Kaspick <akaspick@gmail.com> wrote: > > Ok, I''m sure we can do that for you. :) > > > > Hey David... fire me off an email and we can look into merging our > > solutions into a plugin and then releasing it to the masses. > > > > Hey Dylan... stay tuned. :) > > > > On 5/1/06, Dylan Stamat <dylans@gmail.com> wrote: > > > So David and Andrew, please post your code and we can start using it ! > > > I''m often doing this exact task, but haven''t refactored this out yet. Help > > > you, help me, be DRY :) > > > > > > > > > > > > > > > On 4/29/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote: > > > > > > > Hello David ! > > > > > > 2006/4/29, David Felstead <david.felstead@gmail.com>: > > > > I''ve created a couple of useful helpers that automatically generate > > > > the tags for the submit button/link, the busy indicator and the > > > > related javascript, and was wondering if it''s worth sumitting an > > > > enhancement patch for? It''s very simple, but takes a lot of the > > > > repetition out of doing AJAX stuff. > > > > > > This is stuff for a plugin, no ? That''s what plugins are for - > > > extending core, while not polluting core with something that would not > > > be useful to everyone. > > > > > > If the plugin is so useful that everyone downloads it, you can be > > > pretty sure that it can be integrated into core. > > > > > > Bye ! > > > -- > > > François Beausoleil > > > http://blog.teksol.info/ > > > > > > _______________________________________________ > > > Rails-core mailing list > > > Rails-core@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > > > > > > > > > > _______________________________________________ > > > Rails-core mailing list > > > Rails-core@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > > > > > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core >
Awesome... I''ll check this out soon ! On 5/1/06, David Felstead <david.felstead@gmail.com> wrote:> > Hey Andrew - sorry, been busy :) > > I''ll take a look and see if there''s anything useful I can add. > > Cheers! > > -DF > > On 5/2/06, Andrew Kaspick <akaspick@gmail.com> wrote: > > Well, here''s my first draft of the remote plugin (after some feedback > > i''ll put it into a public svn repo)... > > http://www.redlinesoftware.com/remote_helpers.tgz > > > > Just tar -xzf into the plugins dir. > > > > I wrote the README up pretty quick, but I hope it makes sense. > > > > David (Felstead)... if you have anything similar or improvements on > > this, I''d be happy to integrate them. > > > > Dylan... take a look and let me know if this looks useful to you. > > > > Thanks, > > Andrew > > > > > > On 5/1/06, Andrew Kaspick <akaspick@gmail.com> wrote: > > > Ok, I''m sure we can do that for you. :) > > > > > > Hey David... fire me off an email and we can look into merging our > > > solutions into a plugin and then releasing it to the masses. > > > > > > Hey Dylan... stay tuned. :) > > > > > > On 5/1/06, Dylan Stamat <dylans@gmail.com> wrote: > > > > So David and Andrew, please post your code and we can start using it > ! > > > > I''m often doing this exact task, but haven''t refactored this out > yet. Help > > > > you, help me, be DRY :) > > > > > > > > > > > > > > > > > > > > On 4/29/06, Francois Beausoleil <francois.beausoleil@gmail.com> > wrote: > > > > > > > > > Hello David ! > > > > > > > > 2006/4/29, David Felstead <david.felstead@gmail.com>: > > > > > I''ve created a couple of useful helpers that automatically > generate > > > > > the tags for the submit button/link, the busy indicator and the > > > > > related javascript, and was wondering if it''s worth sumitting an > > > > > enhancement patch for? It''s very simple, but takes a lot of the > > > > > repetition out of doing AJAX stuff. > > > > > > > > This is stuff for a plugin, no ? That''s what plugins are for - > > > > extending core, while not polluting core with something that would > not > > > > be useful to everyone. > > > > > > > > If the plugin is so useful that everyone downloads it, you can be > > > > pretty sure that it can be integrated into core. > > > > > > > > Bye ! > > > > -- > > > > François Beausoleil > > > > http://blog.teksol.info/ > > > > > > > > _______________________________________________ > > > > Rails-core mailing list > > > > Rails-core@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Rails-core mailing list > > > > Rails-core@lists.rubyonrails.org > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > > > > > > > > > > > > > > > _______________________________________________ > > Rails-core mailing list > > Rails-core@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core >_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core