view plugins/redmine_bibliography/assets/javascripts/bibliography.js @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents 00a51e442fe9
children
line wrap: on
line source
// bibliography.js

function disable_fields(){
	$this = $(this);

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

    // Always hides on save
    $this.closest('div').prev().find('p.search_author_tie').hide();

    $this.siblings('.author_edit_btn').show();
    $this.hide();

    return false;
}

function enable_fields(){
    $this = $(this);

    $author_info = $this.closest('div').prev();
//    $author_info.children('.description').toggle();
    $author_info.find('p :input').attr("readonly", false);
    $author_info.find('p :input').removeClass('readonly');

    // Always shows on edit
    $this.closest('div').prev().find('p.search_author_tie').show();

    $this.siblings('.author_save_btn').show();
    $this.hide();

    return false;
}