Mercurial > hg > soundsoftware-site
annotate vendor/plugins/redmine_bibliography/assets/javascripts/authors.js @ 468:0bb9c7baed07 feature_36
dynamically adding/removing users.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 23 Jun 2011 18:52:30 +0100 |
parents | c1ecc16cf38e |
children | ae87ae455cfb |
rev | line source |
---|---|
luis@467 | 1 function remove_author(link){ |
luis@468 | 2 $(link).previous('input[type=hidden]').value = 1; |
luis@468 | 3 $(link).up('.author_fields').remove(); |
luis@468 | 4 } |
luis@468 | 5 |
luis@468 | 6 function add_fields(link, association, content) { |
luis@468 | 7 var new_id = new Date().getTime(); |
luis@468 | 8 var regexp = new RegExp("new_" + association, "g") |
luis@468 | 9 $(link).parent().before(content.replace(regexp, new_id)); |
luis@467 | 10 } |