vendor/assets/javascripts/jquery.remotipart.js in remotipart-1.2.1 vs vendor/assets/javascripts/jquery.remotipart.js in remotipart-1.3.0
- old
+ new
@@ -49,10 +49,12 @@
}
// Allow remotipartSubmit to be cancelled if needed
if ($.rails.fire(form, 'ajax:remotipartSubmit', [xhr, settings])) {
// Second verse, same as the first
- $.rails.ajax(settings);
+ $.rails.ajax(settings).complete(function(data){
+ $.rails.fire(form, 'ajax:remotipartComplete', [data]);
+ });
setTimeout(function(){ $.rails.disableFormElements(form); }, 20);
}
//Run cleanup
remotipart.teardown(form);