Revision 1278:f8bb7ccc6fac plugins/redmine_bibliography/assets/javascripts
| plugins/redmine_bibliography/assets/javascripts/authors.js | ||
|---|---|---|
| 1 |
function remove_fields(link) {
|
|
| 2 |
$(link).previous("input[type=hidden]").value = "1";
|
|
| 3 |
$(link).up(".fields").hide();
|
|
| 1 |
function add_author_fields(link, association, content, action) {
|
|
| 2 |
var new_id = new Date().getTime(); |
|
| 3 |
var regexp = new RegExp("new_" + association, "g");
|
|
| 4 |
|
|
| 5 |
$(link).before(content.replace(regexp, new_id)); |
|
| 6 |
|
|
| 7 |
if(action != "new"){
|
|
| 8 |
toggle_save_author(new_id, $(link)); |
|
| 9 |
} |
|
| 4 | 10 |
} |
| 5 | 11 |
|
| 6 |
function add_author_fields(link, association, content, action) {
|
|
| 7 |
var new_id = new Date().getTime(); |
|
| 8 |
var regexp = new RegExp("new_" + association, "g");
|
|
| 9 |
$(link).insert({
|
|
| 10 |
before: content.replace(regexp, new_id) |
|
| 11 |
}); |
|
| 12 |
if(action != "new"){
|
|
| 13 |
toggle_save_author(new_id, $(link)); |
|
| 14 |
}; |
|
| 12 |
function remove_fields(link) {
|
|
| 13 |
$(link).prev("input[type=hidden]").val("1");
|
|
| 14 |
$(link).closest(".fields").hide();
|
|
| 15 | 15 |
} |
| 16 | 16 |
|
| 17 | 17 |
function identify_author_status(status, object_id) {
|
Also available in: Unified diff