changeset 1292:bb51e86fa182 redmine-2.2-integration

removed deprecated rails functions
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 21 May 2013 18:12:13 +0100
parents 97b98e7a6eee
children b7af3c2d1f0c
files plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb plugins/redmine_bibliography/assets/javascripts/authors.js
diffstat 2 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb	Tue May 21 18:11:44 2013 +0100
+++ b/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb	Tue May 21 18:12:13 2013 +0100
@@ -11,11 +11,11 @@
     <p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p>
 
     <p class="author_identify">
-      <label class='inline'><%= radio_button_tag(:identify_author, "yes", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_yes ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_yes) %> </label><br />
+      <label class='inline'><%= radio_button_tag(:identify_author, "yes", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_yes )) %> <%= l(:identify_author_yes) %> </label><br />
 
-    <label class='inline'><%= radio_button_tag(:identify_author, "correct", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_corrections ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_correct) %> </label><br />
+    <label class='inline'><%= radio_button_tag(:identify_author, "correct", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_corrections )) %> <%= l(:identify_author_correct) %> </label><br />
 
-        <label class='inline'><%= radio_button_tag(:identify_author, "no", true, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_no ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_no) %> </label><br />
+        <label class='inline'><%= radio_button_tag(:identify_author, "no", true, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_no )) %> <%= l(:identify_author_no) %> </label><br />
       </p>
     </div>
 
@@ -40,12 +40,7 @@
 
   <p>
 
-  <%- if params[:action] == 'new' -%>
-    <%= button_to_function l(:label_save_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
-  <%- else -%>
-    <%= button_to_function l(:label_edit_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
-  <%- end -%>
-
+  <%= button_to_function l(:label_save_author), {}, :id => form_tag_id( f.object_name, :edit_save_button ) %>
 
   <%= link_to_remove_fields l("remove_author"), f %>
   </p>
--- a/plugins/redmine_bibliography/assets/javascripts/authors.js	Tue May 21 18:11:44 2013 +0100
+++ b/plugins/redmine_bibliography/assets/javascripts/authors.js	Tue May 21 18:12:13 2013 +0100
@@ -45,6 +45,12 @@
             };
         });
 
+
+$("input[id$='identify_author_yes']").live("click", function() {
+    console.log("aaaa");
+});
+
+
 function toggle_div(div_id){
     $("#" + div_id).toggle(0.3);
 }