This project is archived and is in readonly mode.
New UJS helpers do not have a way to render a "loading..." text / icon
-
Victor Costan
How about allowing :remote to take a Hash of options instead of true? The option :indicator (rendered as a data-indicator-name attribute) would be a name that would match the data-indicator attribute of one or many elements inside the form. The elements' style would be set to "visibility: hidden;" at rendering time, then to "visibility: visible;" before the AJAX request, and back to "visibility: hidden;" after the completion of the AJAX request.
-
Steve St. Martin
- Tag changed from rails3, ujs to invalid, rails3, ujs
This can easily be accomplished each driver has a custom callback that fires before the request is sent, here is an example using the jQuery driver.
$('#new_resource').live('ajax:loading', function() { // code to display loading div });you could also do this globally by using
$.ajaxSetup({ beforeSend: function() { // code to display loading div } });ticket should be marked as invalid
-
Rohit Arondekar
- State changed from new to invalid