# HG changeset patch # User luisf # Date 1377954171 -3600 # Node ID 0b2a75f6095290bbd42a1392cac4acf6332cfcdb # Parent f0da42a09a3c006c1e181d470c4029dbdca95084 adding javascript library file diff -r f0da42a09a3c -r 0b2a75f60952 plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb --- a/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb Sat Aug 31 13:22:20 2013 +0100 +++ b/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb Sat Aug 31 14:02:51 2013 +0100 @@ -1,5 +1,7 @@ <%- content_for :header_tags do -%> <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' -%> + <%= javascript_include_tag 'bibliography', :plugin => 'redmine_bibliography' -%> + <%= javascript_tag "$('.author_save_btn').live('click', toggle_fields);" -%> <%- end -%>
@@ -35,7 +37,7 @@

- <%= button_to_function l(:label_save_author), '', :id => form_tag_id( f.object_name, :edit_save_button ) -%> + <%= button_to_function l(:label_save_author), '', :id => form_tag_id(f.object_name, :edit_save_button), :class => 'author_save_btn' -%> <%= link_to_remove_fields l("remove_author"), f %>

diff -r f0da42a09a3c -r 0b2a75f60952 plugins/redmine_bibliography/app/views/publications/_form.html.erb --- a/plugins/redmine_bibliography/app/views/publications/_form.html.erb Sat Aug 31 13:22:20 2013 +0100 +++ b/plugins/redmine_bibliography/app/views/publications/_form.html.erb Sat Aug 31 14:02:51 2013 +0100 @@ -2,7 +2,6 @@ <%= javascript_tag " $('#publication_bibtex_entry_attributes_entry_type').live('change', function() { $this = $(this); - $.ajax({ type: 'get', url: '#{url_for(:controller => :publications, :action => :show_bibtex_fields)}', @@ -11,7 +10,6 @@ }, dataType: 'script' }); - return false; });" -%>