Permalink
Browse files

Call close() on cancel or success, for hookworthiness

  • Loading branch information...
1 parent ec1faa6 commit f9ecec6873246a0be148c5ffcb3b28891bae2a09 @mwilden mwilden committed Apr 29, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 app/assets/javascripts/widgets/nested_form.coffee
@@ -47,12 +47,14 @@ class AntCat.NestedForm
cancel: =>
@options.on_cancel() if @options.on_cancel
+ @close()
false
update: (data, statusText, xhr, $form) =>
@stop_spinning()
@options.on_update data if @options.on_update
@options.on_done data if data.success and @options.on_done
+ @close() if data.success
handle_error: (jq_xhr, text_status, error_thrown) =>
@stop_spinning()

0 comments on commit f9ecec6

Please sign in to comment.