changeset 1326:8516c3292901 redmine-2.2-integration

correctly displays bibtex fields for editing
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 19 Jun 2013 18:52:48 +0100
parents 4ef7df804bab
children 287f201c2802
files plugins/redmine_bibliography/app/views/publications/edit.html.erb plugins/redmine_bibliography/assets/javascripts/bibliography.js
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 %>
 
 <h2><%=l(:label_publication_show)%></h2>
 
-<% 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 }  %>
 
   <div style="clear:both"></div>
--- 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