# HG changeset patch # User luisf # Date 1368183181 -3600 # Node ID 99fe7b784587f1f1d7d8d7abd2a6b1e07654ee10 # Parent 20a6b12d1aba5efbfb772608326d0b748fb1fc24 Removed unused code (moved to show_bibtex_fields.js.erb view). diff -r 20a6b12d1aba -r 99fe7b784587 plugins/redmine_bibliography/assets/javascripts/authors.js --- a/plugins/redmine_bibliography/assets/javascripts/authors.js Fri May 10 11:50:40 2013 +0100 +++ b/plugins/redmine_bibliography/assets/javascripts/authors.js Fri May 10 11:53:01 2013 +0100 @@ -20,24 +20,24 @@ s.value = ""; s.readOnly = false; }; - + if(status == "correct"){s.readOnly = false;}; if(status == "yes"){s.readOnly = true;}; }); } -function toggle_div(div_id){ +function toggle_div(div_id){ Effect.toggle(div_id, "appear", {duration:0.3}); } -function toggle_input_field(field){ +function toggle_input_field(field){ if (field.classNames().inspect().include("readonly") == false){ - field.readOnly = true; + field.readOnly = true; field.addClassName('readonly'); } else { field.readOnly = false; field.removeClassName('readonly'); - }; + }; } function toggle_edit_save_button(object_id){ @@ -58,19 +58,4 @@ }); toggle_edit_save_button(form_object_id); toggle_div("publication_authorships_attributes_" + form_object_id +"_search_author"); -} - -function hide_all_bibtex_required_fields(){$$('p.bibtex').each(function(s){s.hide()})} - -// entrytype_fields is a jsno array with the fields requires by the selected bibtex entry -function show_required_bibtex_fields(entrytype_fields) { - $$('p.bibtex').each(function(s){ - if(entrytype_fields.indexOf(s.down('input').id.split('_').last()) != -1){ - s.show(); - } - else { - s.hide(); - } - }) -} - \ No newline at end of file +} \ No newline at end of file