fix #892. The spinner was never removed. In the normal case this didn't matter because the whole edit form was removed anyway. But in case of an error, the form remained visible and the submit button was not accessable anymore.

fixed by keeping track of the last spinning submit button for todos
This commit is contained in:
Reinier Balt 2009-05-13 21:40:53 +02:00
parent 29bcfd90c2
commit 5de81825ca

View file

@ -16,8 +16,8 @@ module TodosHelper
&block )
apply_behavior 'form.edit_todo_form', make_remote_form(
:method => :put,
:before => "this.down('button.positive').startWaiting()",
:loaded => "this.down('button.positive').stopWaiting()",
:before => "todoSpinner = this.down('button.positive'); todoSpinner.startWaiting()",
:loaded => "todoSpinner.stopWaiting()",
:condition => "!(this.down('button.positive').isWaiting())"),
:prevent_default => true
end