Skip to content

Commit

Permalink
delete confirmation and animation
Browse files Browse the repository at this point in the history
  • Loading branch information
barda committed Dec 2, 2010
1 parent fe80fa8 commit 7721f84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 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)
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/application.js
Expand Up @@ -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.