Skip to content
Browse files

delete confirmation and animation

  • Loading branch information...
1 parent fe80fa8 commit 7721f846ae9ee693340fb31e15a544140d11a722 @barda barda committed Dec 3, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/helpers/application_helper.rb
  2. +1 −1 public/javascripts/application.js
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();
}

0 comments on commit 7721f84

Please sign in to comment.
Something went wrong with that request. Please try again.