view 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
line wrap: on
line source
function remove_author(link){
	$(link).previous('input[type=hidden]').value = 1;
	$(link).up('.author_fields').remove();
}

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));
}