Revision 1277:99fe7b784587 plugins/redmine_bibliography
| plugins/redmine_bibliography/assets/javascripts/authors.js | ||
|---|---|---|
| 20 | 20 |
s.value = ""; |
| 21 | 21 |
s.readOnly = false; |
| 22 | 22 |
}; |
| 23 |
|
|
| 23 |
|
|
| 24 | 24 |
if(status == "correct"){s.readOnly = false;};
|
| 25 | 25 |
if(status == "yes"){s.readOnly = true;};
|
| 26 | 26 |
}); |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
function toggle_div(div_id){
|
|
| 29 |
function toggle_div(div_id){
|
|
| 30 | 30 |
Effect.toggle(div_id, "appear", {duration:0.3});
|
| 31 | 31 |
} |
| 32 | 32 |
|
| 33 |
function toggle_input_field(field){
|
|
| 33 |
function toggle_input_field(field){
|
|
| 34 | 34 |
if (field.classNames().inspect().include("readonly") == false){
|
| 35 |
field.readOnly = true;
|
|
| 35 |
field.readOnly = true; |
|
| 36 | 36 |
field.addClassName('readonly');
|
| 37 | 37 |
} else {
|
| 38 | 38 |
field.readOnly = false; |
| 39 | 39 |
field.removeClassName('readonly');
|
| 40 |
};
|
|
| 40 |
}; |
|
| 41 | 41 |
} |
| 42 | 42 |
|
| 43 | 43 |
function toggle_edit_save_button(object_id){
|
| ... | ... | |
| 58 | 58 |
}); |
| 59 | 59 |
toggle_edit_save_button(form_object_id); |
| 60 | 60 |
toggle_div("publication_authorships_attributes_" + form_object_id +"_search_author");
|
| 61 |
} |
|
| 62 |
|
|
| 63 |
function hide_all_bibtex_required_fields(){$$('p.bibtex').each(function(s){s.hide()})}
|
|
| 64 |
|
|
| 65 |
// entrytype_fields is a jsno array with the fields requires by the selected bibtex entry |
|
| 66 |
function show_required_bibtex_fields(entrytype_fields) {
|
|
| 67 |
$$('p.bibtex').each(function(s){
|
|
| 68 |
if(entrytype_fields.indexOf(s.down('input').id.split('_').last()) != -1){
|
|
| 69 |
s.show(); |
|
| 70 |
} |
|
| 71 |
else {
|
|
| 72 |
s.hide(); |
|
| 73 |
} |
|
| 74 |
}) |
|
| 75 |
} |
|
| 76 |
|
|
| 61 |
} |
|
Also available in: Unified diff