Revision 953:b52621512b47 vendor/plugins/redmine_bibliography

View differences:

vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb
45 45

  
46 46
  <%= link_to_remove_fields l("remove_author"), f %>
47 47
  </p>
48
<br />
49
</fieldset>
48 50

  
49
</fieldset>
50
<br />
vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb
18 18

  
19 19
<h3><%= l(:authors) %></h3>    
20 20
  <div class="box tabular">
21
    <div id="authors" class="fields">
22
      
21
    <div id="authors" class="fields">      
23 22
      <% f.fields_for :authorships do |builder| -%>
24 23
        <%= render "authorship_fields", :f => builder %>
25 24
      <%- end -%>
26

  
27
      <%= link_to_add_author_fields l(:label_add_an_author), f, :authorships, params[:action] %>
28 25
    </div>
26
    <%= link_to_add_author_fields l(:label_add_an_author), f, :authorships, params[:action] %>
29 27
  </div>
30 28
</div>
vendor/plugins/redmine_bibliography/assets/javascripts/authors.js
6 6
function add_author_fields(link, association, content, action) {
7 7
	var new_id = new Date().getTime();
8 8
  var regexp = new RegExp("new_" + association, "g");
9
  $(link).insert({
10
		before: content.replace(regexp, new_id)
11
  });
9

  
10
  $('authors').insert(content.replace(regexp, new_id));
11

  
12 12
	if(action != "new"){
13 13
		toggle_save_author(new_id, $(link));
14 14
	};

Also available in: Unified diff