Mercurial > hg > soundsoftware-site
view 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 source
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(); } function add_fields(link, association, content) { var new_id = new Date().getTime(); var regexp = new RegExp("new_" + association, "g") $(link).up().insert({ before: content.replace(regexp, new_id) }); }