# HG changeset patch # User luisf # Date 1371664368 -3600 # Node ID 8516c329290152600ce0524f43a514751f9e8551 # Parent 4ef7df804bab8fa541b0c0f5da11e30a9a1f6fbb correctly displays bibtex fields for editing diff -r 4ef7df804bab -r 8516c3292901 plugins/redmine_bibliography/app/views/publications/edit.html.erb --- a/plugins/redmine_bibliography/app/views/publications/edit.html.erb Wed Jun 19 18:27:44 2013 +0100 +++ b/plugins/redmine_bibliography/app/views/publications/edit.html.erb Wed Jun 19 18:52:48 2013 +0100 @@ -1,12 +1,12 @@ <% content_for :header_tags do %> <%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %> - <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> - <%= javascript_tag 'Event.observe(window, "load", function(e){show_required_bibtex_fields(' + @bibtype_fields.to_json + ')});' %> + <%= javascript_include_tag 'bibliography', :plugin => 'redmine_bibliography' %> + <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> <% end %>

<%=l(:label_publication_show)%>

-<% labelled_form_for @publication, :url => { :project_id => @project, :action => :update } do |f| -%> +<%= labelled_form_for @publication, :url => { :project_id => @project, :action => :update } do |f| -%> <%= render :partial => 'form', :locals => { :f => f } %>
diff -r 4ef7df804bab -r 8516c3292901 plugins/redmine_bibliography/assets/javascripts/bibliography.js --- a/plugins/redmine_bibliography/assets/javascripts/bibliography.js Wed Jun 19 18:27:44 2013 +0100 +++ b/plugins/redmine_bibliography/assets/javascripts/bibliography.js Wed Jun 19 18:52:48 2013 +0100 @@ -13,3 +13,6 @@ return false; }); +$(document).ready(function() { + $("#publication_bibtex_entry_attributes_entry_type").trigger('change'); +}); \ No newline at end of file