Revision 1394:0f918e37e1d6 plugins/redmine_bibliography/assets

View differences:

plugins/redmine_bibliography/assets/javascripts/authors.js
10 10
  $(link).closest(".fields").hide();
11 11
}
12 12

  
13
$(".author_search").live('keyup.autocomplete', function(){
13
$(".author_name_on_paper").live('keyup.autocomplete', function(){
14 14
     $this = $(this);
15 15

  
16 16
     $this.autocomplete({
......
21 21
            return false;
22 22
        },
23 23
        select: function(event, ui){
24
            $this.closest('div').next().find("input[id$='name_on_paper']").val(ui.item.name);
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);
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);
24
            $this.closest('div').find("input[id$='institution']").val(ui.item.institution);
25
            $this.closest('div').find("input[id$='email']").val(ui.item.email);
26

  
27
            $this.closest('div').find("input[id$='search_author_class']").val(ui.item.search_author_class);
28
            $this.closest('div').find("input[id$='search_author_id']").val(ui.item.search_author_id);
29
            $this.closest('div').find("input[id$='search_author_tie']").attr('checked', 'checked');
30

  
31

  
32

  
33
            // triggers the save button
34
            $this.closest('div').next('div').find('.author_save_btn').click();
29 35
        }
30 36
        })
31 37
        .data( "autocomplete" )._renderItem = function( ul, item ) {
......
36 42
            };
37 43
        });
38 44

  
39

  
40
$("input[id$='identify_author_yes']").live("click", function() {
41
    console.log("aaaa");
42
});
43

  
44
$("input[id$='identify_author_no']").live("click", function() {
45
    $this.closest('div').next().find("input[id$='name_on_paper']").val('');
46
    $this.closest('div').next().find("input[id$='institution']").val('');
47
    $this.closest('div').next().find("input[id$='email']").val('');
48
    $this.closest('div').next().find("input[id$='search_author_class']").val('');
49
});
50

  
plugins/redmine_bibliography/assets/javascripts/bibliography.js
2 2

  
3 3
function disable_fields(){
4 4
	$this = $(this);
5

  
5 6
	$author_info = $this.closest('div').prev();
6
	$author_info.children('.description').toggle();
7
//    $author_info.children('.description').toggle();
7 8
	$author_info.find('p :input').attr("readonly", true);
8 9
    $author_info.find('p :input').addClass('readonly');
9 10

  
......
15 16

  
16 17
function enable_fields(){
17 18
    $this = $(this);
19

  
18 20
    $author_info = $this.closest('div').prev();
19
    $author_info.children('.description').toggle();
21
//    $author_info.children('.description').toggle();
20 22
    $author_info.find('p :input').attr("readonly", false);
21 23
    $author_info.find('p :input').removeClass('readonly');
22 24

  
......
25 27

  
26 28
    return false;
27 29
}
30

  
plugins/redmine_bibliography/assets/stylesheets/bibliography.css
20 20
}
21 21

  
22 22
.tabular .author_edit .description {
23
    padding-top: 0;
24 23
    font-style: italic;
24
    font-size: small;
25 25
}
26 26

  
27 27
.publication_project {
28 28
    margin-right: 18px;
29 29
}
30 30

  
31
#authors select {
32
    min-width: 150px;
33
}
34

  
35

  
36 31
div#bibliography dd { margin-bottom: 1em; font-size: 0.9em; }
37 32

  
38 33
div#bibliography dd .authors { font-style: italic; }
......
74 69
.author_edit_btn {
75 70
  display:none;
76 71
}
77

  

Also available in: Unified diff