Mercurial > hg > soundsoftware-site
diff vendor/plugins/redmine_bibliography/assets/javascripts/authors.js @ 469:ae87ae455cfb feature_36
correctly saving authors.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Fri, 24 Jun 2011 11:23:23 +0100 |
parents | 0bb9c7baed07 |
children | 30b36ab6f15a |
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Thu Jun 23 18:52:30 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Fri Jun 24 11:23:23 2011 +0100 @@ -3,8 +3,15 @@ $(link).up('.author_fields').remove(); } +function remove_fields(link) { + $(link).previous("input[type=hidden]").value = "1"; + $(link).up(".fields").hide(); +} + function add_fields(link, association, content) { var new_id = new Date().getTime(); var regexp = new RegExp("new_" + association, "g") - $(link).parent().before(content.replace(regexp, new_id)); + $(link).up().insert({ + before: content.replace(regexp, new_id) + }); } \ No newline at end of file