Revision 723:d41bf754c0f2 vendor/plugins/redmine_bibliography/assets
| vendor/plugins/redmine_bibliography/assets/javascripts/authors.js | ||
|---|---|---|
| 1 |
function remove_fields(link) {
|
|
| 2 |
$(link).previous("input[type=hidden]").value = "1";
|
|
| 3 |
$(link).up(".fields").hide();
|
|
| 4 |
} |
|
| 5 |
|
|
| 6 |
function add_fields(link, association, content) {
|
|
| 7 |
var new_id = new Date().getTime(); |
|
| 8 |
var regexp = new RegExp("new_" + association, "g")
|
|
| 9 |
$(link).insert({
|
|
| 10 |
before: content.replace(regexp, new_id) |
|
| 11 |
}); |
|
| 12 |
} |
|
| 13 |
|
|
| 14 |
function identify_author_status(status, object_id) {
|
|
| 15 |
$('publication_authorships_attributes_' + object_id + '_edit_author_info').select('input').each(function(s) {
|
|
| 16 |
if(status == "no"){
|
|
| 17 |
s.value = ""; |
|
| 18 |
s.readOnly = false; |
|
| 19 |
}; |
|
| 20 |
|
|
| 21 |
if(status == "correct"){s.readOnly = false;};
|
|
| 22 |
if(status == "yes"){s.readOnly = true;};
|
|
| 23 |
}); |
|
| 24 |
} |
|
| 25 |
|
|
| 26 |
function toggle_div(div_id){
|
|
| 27 |
Effect.toggle(div_id, "appear", {duration:0.3});
|
|
| 28 |
} |
|
| 29 |
|
|
| 30 |
function toggle_input_field(field){
|
|
| 31 |
if (field.classNames().inspect().include("readonly") == false){
|
|
| 32 |
field.readOnly = true; |
|
| 33 |
field.addClassName('readonly');
|
|
| 34 |
} else {
|
|
| 35 |
field.readOnly = false; |
|
| 36 |
field.removeClassName('readonly');
|
|
| 37 |
}; |
|
| 38 |
} |
|
| 39 |
|
|
| 40 |
function toggle_edit_save_button(object_id){
|
|
| 41 |
$button = $('publication_authorships_attributes_' + object_id + '_edit_save_button');
|
|
| 42 |
if ($button.value == "Edit author"){
|
|
| 43 |
$button.value = "Save author"; |
|
| 44 |
} else {
|
|
| 45 |
$button.value = "Edit author"; |
|
| 46 |
}; |
|
| 47 |
} |
|
| 48 |
|
|
| 49 |
function toggle_save_author(form_object_id, $this){
|
|
| 50 |
$('publication_authorships_attributes_' + form_object_id + '_edit_author_info').select('input').each(function(s) {
|
|
| 51 |
toggle_input_field(s, $this); |
|
| 52 |
}); |
|
| 53 |
$('publication_authorships_attributes_' + form_object_id + '_edit_author_info').select('p.description').each(function(s) {
|
|
| 54 |
s.toggle(); |
|
| 55 |
}); |
|
| 56 |
toggle_edit_save_button(form_object_id); |
|
| 57 |
toggle_div("publication_authorships_attributes_" + form_object_id +"_search_author");
|
|
| 58 |
} |
|
| 59 |
|
|
| 60 |
function hide_all_bibtex_required_fields(){$$('p.bibtex').each(function(s){s.hide()})}
|
|
| 61 |
|
|
| 62 |
// entrytype_fields is a jsno array with the fields requires by the selected bibtex entry |
|
| 63 |
function show_required_bibtex_fields(entrytype_fields) {
|
|
| 64 |
$$('p.bibtex').each(function(s){
|
|
| 65 |
if(entrytype_fields.indexOf(s.down('input').id.split('_').last()) != -1){
|
|
| 66 |
s.show(); |
|
| 67 |
} |
|
| 68 |
else {
|
|
| 69 |
s.hide(); |
|
| 70 |
} |
|
| 71 |
}) |
|
| 72 |
} |
|
| 73 |
|
|
| vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css | ||
|---|---|---|
| 1 |
li .handle {
|
|
| 2 |
font-size: 12px; |
|
| 3 |
cursor: move; |
|
| 4 |
color: #777; |
|
| 5 |
} |
|
| 6 |
|
|
| 7 |
input.readonly {
|
|
| 8 |
border: none; |
|
| 9 |
padding: 0; |
|
| 10 |
margin: 0; |
|
| 11 |
background-color: transparent; |
|
| 12 |
} |
|
| 13 |
|
|
| 14 |
.tabular .author_identify label {
|
|
| 15 |
font-weight: normal; |
|
| 16 |
} |
|
| 17 |
|
|
| 18 |
.tabular .author_edit p {
|
|
| 19 |
padding-bottom: 0; |
|
| 20 |
} |
|
| 21 |
|
|
| 22 |
.tabular .author_edit .description {
|
|
| 23 |
padding-top: 0; |
|
| 24 |
font-style: italic; |
|
| 25 |
} |
|
| 26 |
|
|
| 27 |
.publication_project {
|
|
| 28 |
margin-right: 18px; |
|
| 29 |
} |
|
| 30 |
|
|
| 31 |
#authors select {
|
|
| 32 |
min-width: 150px; |
|
| 33 |
} |
|
| 34 |
|
|
| 35 |
div#bibliography dl { margin-left: 2em; }
|
|
| 36 |
div#bibliography .box dl { margin-left: 0; }
|
|
| 37 |
div#bibliography dt { margin-bottom: 0px; padding-left: 20px }
|
|
| 38 |
div#bibliography .box dt { margin-bottom: 0px; padding-left: 10px }
|
|
| 39 |
div#bibliography dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
|
|
| 40 |
div#bibliography .box dd { margin-bottom: 0.6em; padding-left: 0; }
|
|
| 41 |
div#bibliography dd .authors { font-style: italic; }
|
|
| 42 |
div#bibliography dd span.authors { color: #808080; }
|
|
| 43 |
div#bibliography dd span.year { padding-left: 0.6em; }
|
|
| 44 |
|
|
| 45 |
div#bibliography h3 { background: url(../../../images/table_multiple.png) no-repeat 0% 50%; padding-left: 20px; }
|
|
Also available in: Unified diff