Lines 1-28
Link Here
|
1 |
$(document).ready(function() { |
1 |
(function () { |
2 |
$("#additional_fields_form_section").on("click", ".clone_attribute", function(e){ |
2 |
$(document).ready(function () { |
3 |
e.preventDefault(); |
3 |
$("#additional_fields_form_section").on( |
4 |
clone_entry( this ); |
4 |
"click", |
5 |
}); |
5 |
".clone_attribute", |
|
|
6 |
function (e) { |
7 |
e.preventDefault(); |
8 |
clone_entry(this); |
9 |
} |
10 |
); |
6 |
|
11 |
|
7 |
$("#additional_fields_form_section").on("click", ".clear_attribute", function(e){ |
12 |
$("#additional_fields_form_section").on( |
8 |
e.preventDefault(); |
13 |
"click", |
9 |
clear_entry( this ); |
14 |
".clear_attribute", |
10 |
}); |
15 |
function (e) { |
|
|
16 |
e.preventDefault(); |
17 |
clear_entry(this); |
18 |
} |
19 |
); |
11 |
|
20 |
|
12 |
$('#additional_fields_form_section').parents('form ').submit(function() { |
21 |
$("#additional_fields_form_section") |
13 |
$('.marcfieldget').prop("disabled", false); |
22 |
.parents("form ") |
14 |
return true; |
23 |
.submit(function () { |
|
|
24 |
$(".marcfieldget").prop("disabled", false); |
25 |
return true; |
26 |
}); |
15 |
}); |
27 |
}); |
16 |
}); |
|
|
17 |
|
28 |
|
18 |
function clone_entry(node) { |
29 |
function clone_entry(node) { |
19 |
var original = $(node).parent(); |
30 |
var original = $(node).parent(); |
20 |
var clone = $(node).parent().clone(); |
31 |
var clone = $(node).parent().clone(); |
21 |
$(original).after(clone); |
32 |
$(original).after(clone); |
22 |
return false; |
33 |
return false; |
23 |
} |
34 |
} |
24 |
|
35 |
|
25 |
function clear_entry(node) { |
36 |
function clear_entry(node) { |
26 |
var original = $(node).parent(); |
37 |
var original = $(node).parent(); |
27 |
$("input", original).val(''); |
38 |
$("input", original).val(""); |
28 |
} |
39 |
} |
|
|
40 |
})(); |
29 |
- |
|
|