comparison plugins/redmine_bibliography/assets/javascripts/authors.js @ 1286:d0d6bbe9f2e0 redmine-2.2-integration

removed unused code; renamed variables.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 14 May 2013 19:09:34 +0100
parents 22551cc54749
children 7e89ba7fac48
comparison
equal deleted inserted replaced
1285:22551cc54749 1286:d0d6bbe9f2e0
22 minLength: 2, 22 minLength: 2,
23 select: function(event, ui){ 23 select: function(event, ui){
24 $this.closest('div').next().find("input[id$='name_on_paper']").val(ui.item.value); 24 $this.closest('div').next().find("input[id$='name_on_paper']").val(ui.item.value);
25 $this.closest('div').next().find("input[id$='institution']").val(ui.item.institution); 25 $this.closest('div').next().find("input[id$='institution']").val(ui.item.institution);
26 $this.closest('div').next().find("input[id$='email']").val(ui.item.email); 26 $this.closest('div').next().find("input[id$='email']").val(ui.item.email);
27 $this.closest('div').next().find("input[id$='object_class']").val(ui.item.object_class); 27 $this.closest('div').next().find("input[id$='search_author_class']").val(ui.item.search_author_class);
28 $this.closest('div').next().find("input[id$='search_author_id']").val(ui.item.search_author_id);
28 } 29 }
29 }); 30 });
30 }); 31 });
31 32
32 33
64 } 65 }
65 66
66 function toggle_edit_save_button(object_id){ 67 function toggle_edit_save_button(object_id){
67 $button = $('publication_authorships_attributes_' + object_id + '_edit_save_button'); 68 $button = $('publication_authorships_attributes_' + object_id + '_edit_save_button');
68 if ($button.value == "Edit author"){ 69 if ($button.value == "Edit author"){
69 $button.value = "Save author"; 70 $button.value = "Save author";
70 } else { 71 } else {
71 $button.value = "Edit author"; 72 $button.value = "Edit author";
72 }; 73 }
73 } 74 }
74 75
75 function toggle_save_author(form_object_id, $this){ 76 function toggle_save_author(form_object_id, $this){
76 $('publication_authorships_attributes_' + form_object_id + '_edit_author_info').select('input').each(function(s) { 77 $('publication_authorships_attributes_' + form_object_id + '_edit_author_info').select('input').each(function(s) {
77 toggle_input_field(s, $this); 78 toggle_input_field(s, $this);