# HG changeset patch # User luisf # Date 1308912061 -3600 # Node ID 30b36ab6f15a364751cb2ce601e10d835a0f080e # Parent ae87ae455cfb2b69d4cbd3ec8861f7d6529cf666 Correctly removing authors. diff -r ae87ae455cfb -r 30b36ab6f15a vendor/plugins/redmine_bibliography/app/views/publications/_author_fields.rhtml --- a/vendor/plugins/redmine_bibliography/app/views/publications/_author_fields.rhtml Fri Jun 24 11:23:23 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_author_fields.rhtml Fri Jun 24 11:41:01 2011 +0100 @@ -3,6 +3,6 @@ <%= f.label :name, l("name") %> <%= f.text_field :name %> <%= f.hidden_field :_destroy %> - <%= link_to_function "Remove", "remove_author(this)" %> + <%= link_to_remove_fields "remove", f %>

\ No newline at end of file diff -r ae87ae455cfb -r 30b36ab6f15a vendor/plugins/redmine_bibliography/assets/javascripts/authors.js --- a/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Fri Jun 24 11:23:23 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Fri Jun 24 11:41:01 2011 +0100 @@ -1,8 +1,3 @@ -function remove_author(link){ - $(link).previous('input[type=hidden]').value = 1; - $(link).up('.author_fields').remove(); -} - function remove_fields(link) { $(link).previous("input[type=hidden]").value = "1"; $(link).up(".fields").hide();