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 @ 1430:04cc33a44d4c
History | View | Annotate | Download (914 Bytes)
| 1 | 1379:1053a56bccec | luis | // bibliography.js
|
|---|---|---|---|
| 2 | |||
| 3 | function disable_fields(){ |
||
| 4 | $this = $(this); |
||
| 5 | 1394:0f918e37e1d6 | luis | |
| 6 | 1379:1053a56bccec | luis | $author_info = $this.closest('div').prev(); |
| 7 | 1394:0f918e37e1d6 | luis | // $author_info.children('.description').toggle();
|
| 8 | 1379:1053a56bccec | luis | $author_info.find('p :input').attr("readonly", true); |
| 9 | 1380:fa92d13876d0 | luis | $author_info.find('p :input').addClass('readonly'); |
| 10 | |||
| 11 | 1407:00a51e442fe9 | luis | // Always hides on save
|
| 12 | $this.closest('div').prev().find('p.search_author_tie').hide(); |
||
| 13 | |||
| 14 | 1380:fa92d13876d0 | luis | $this.siblings('.author_edit_btn').show(); |
| 15 | $this.hide();
|
||
| 16 | 1379:1053a56bccec | luis | |
| 17 | return false; |
||
| 18 | 1380:fa92d13876d0 | luis | } |
| 19 | |||
| 20 | function enable_fields(){ |
||
| 21 | $this = $(this); |
||
| 22 | 1394:0f918e37e1d6 | luis | |
| 23 | 1380:fa92d13876d0 | luis | $author_info = $this.closest('div').prev(); |
| 24 | 1394:0f918e37e1d6 | luis | // $author_info.children('.description').toggle();
|
| 25 | 1380:fa92d13876d0 | luis | $author_info.find('p :input').attr("readonly", false); |
| 26 | $author_info.find('p :input').removeClass('readonly'); |
||
| 27 | |||
| 28 | 1407:00a51e442fe9 | luis | // Always shows on edit
|
| 29 | $this.closest('div').prev().find('p.search_author_tie').show(); |
||
| 30 | |||
| 31 | 1380:fa92d13876d0 | luis | $this.siblings('.author_save_btn').show(); |
| 32 | $this.hide();
|
||
| 33 | |||
| 34 | return false; |
||
| 35 | } |