Mercurial > hg > soundsoftware-site
changeset 953:b52621512b47 bibplugin_bibtex
correctly inserting the autorship fields.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 06 Aug 2012 12:33:23 +0100 |
parents | 12f729c9f47d |
children | b42553f6df71 |
files | vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb vendor/plugins/redmine_bibliography/assets/javascripts/authors.js |
diffstat | 3 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb Mon Aug 06 12:13:28 2012 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb Mon Aug 06 12:33:23 2012 +0100 @@ -45,6 +45,6 @@ <%= link_to_remove_fields l("remove_author"), f %> </p> +<br /> +</fieldset> -</fieldset> -<br />
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb Mon Aug 06 12:13:28 2012 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb Mon Aug 06 12:33:23 2012 +0100 @@ -18,13 +18,11 @@ <h3><%= l(:authors) %></h3> <div class="box tabular"> - <div id="authors" class="fields"> - + <div id="authors" class="fields"> <% f.fields_for :authorships do |builder| -%> <%= render "authorship_fields", :f => builder %> <%- end -%> - - <%= link_to_add_author_fields l(:label_add_an_author), f, :authorships, params[:action] %> </div> + <%= link_to_add_author_fields l(:label_add_an_author), f, :authorships, params[:action] %> </div> </div> \ No newline at end of file
--- a/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Mon Aug 06 12:13:28 2012 +0100 +++ b/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Mon Aug 06 12:33:23 2012 +0100 @@ -6,9 +6,9 @@ function add_author_fields(link, association, content, action) { var new_id = new Date().getTime(); var regexp = new RegExp("new_" + association, "g"); - $(link).insert({ - before: content.replace(regexp, new_id) - }); + + $('authors').insert(content.replace(regexp, new_id)); + if(action != "new"){ toggle_save_author(new_id, $(link)); };