To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / plugins / redmine_bibliography / assets / javascripts / bibliography.js @ 1427:2599a11ef11a
History | View | Annotate | Download (914 Bytes)
| 1 |
// bibliography.js
|
|---|---|
| 2 |
|
| 3 |
function disable_fields(){ |
| 4 |
$this = $(this); |
| 5 |
|
| 6 |
$author_info = $this.closest('div').prev(); |
| 7 |
// $author_info.children('.description').toggle();
|
| 8 |
$author_info.find('p :input').attr("readonly", true); |
| 9 |
$author_info.find('p :input').addClass('readonly'); |
| 10 |
|
| 11 |
// Always hides on save
|
| 12 |
$this.closest('div').prev().find('p.search_author_tie').hide(); |
| 13 |
|
| 14 |
$this.siblings('.author_edit_btn').show(); |
| 15 |
$this.hide();
|
| 16 |
|
| 17 |
return false; |
| 18 |
} |
| 19 |
|
| 20 |
function enable_fields(){ |
| 21 |
$this = $(this); |
| 22 |
|
| 23 |
$author_info = $this.closest('div').prev(); |
| 24 |
// $author_info.children('.description').toggle();
|
| 25 |
$author_info.find('p :input').attr("readonly", false); |
| 26 |
$author_info.find('p :input').removeClass('readonly'); |
| 27 |
|
| 28 |
// Always shows on edit
|
| 29 |
$this.closest('div').prev().find('p.search_author_tie').show(); |
| 30 |
|
| 31 |
$this.siblings('.author_save_btn').show(); |
| 32 |
$this.hide();
|
| 33 |
|
| 34 |
return false; |
| 35 |
} |
| 36 |
|