Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

delete confirmation and animation

  • Loading branch information...
commit 7721f846ae9ee693340fb31e15a544140d11a722 1 parent fe80fa8
@barda barda authored
View
2  app/helpers/application_helper.rb
@@ -1,7 +1,7 @@
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
def remove_child_link(name, f)
- f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)")
+ f.hidden_field(:_destroy) + link_to_function(name, "if (confirm('Really?')) remove_fields(this)")
end
def add_child_link(name, f, method)
View
2  public/javascripts/application.js
@@ -13,5 +13,5 @@ function remove_fields(link) {
if (hidden_field) {
hidden_field.value = '1';
}
- $(link).up(".fields").hide();
+ $(link).up(".fields").fade();
}
Please sign in to comment.
Something went wrong with that request. Please try again.