Lines 7-19
function newDescField() {
Link Here
|
7 |
$("#adddescription").before( |
7 |
$("#adddescription").before( |
8 |
'<li><label>setDescription: </label>' + |
8 |
'<li><label>setDescription: </label>' + |
9 |
'<textarea style="vertical-align:middle" rows="2" cols="30" name="description"></textarea>' + |
9 |
'<textarea style="vertical-align:middle" rows="2" cols="30" name="description"></textarea>' + |
10 |
'<a onclick="delDescField(this); return false;" href="#"><i class="fa fa-fw fa-trash"></i> Remove</a>' + |
10 |
'<a class="remove_description" href="#"><i class="fa fa-fw fa-trash"></i> Remove</a>' + |
11 |
'</li>' |
11 |
'</li>' |
12 |
); |
12 |
); |
13 |
} |
13 |
} |
14 |
|
14 |
|
15 |
function delDescField(minusButton) { |
15 |
function delDescField(minusButton) { |
16 |
var li = $(minusButton).parent('li'); |
16 |
var li = minusButton.parent('li'); |
17 |
$(li).remove(); |
17 |
$(li).remove(); |
18 |
} |
18 |
} |
19 |
|
19 |
|
Lines 25-30
$(document).ready(function() {
Link Here
|
25 |
$(".delete_oai_set").on("click",function(){ |
25 |
$(".delete_oai_set").on("click",function(){ |
26 |
return confirmDelete(); |
26 |
return confirmDelete(); |
27 |
}); |
27 |
}); |
|
|
28 |
|
29 |
$("body").on("click", ".remove_description", function(e){ |
30 |
e.preventDefault(); |
31 |
delDescField($(this)); |
32 |
}); |
33 |
|
34 |
$(".add_description").on("click", function(e){ |
35 |
e.preventDefault(); |
36 |
newDescField(); |
37 |
}); |
38 |
|
28 |
}); |
39 |
}); |
29 |
//]]> |
40 |
//]]> |
30 |
</script> |
41 |
</script> |
Lines 67-76
$(document).ready(function() {
Link Here
|
67 |
<li> |
78 |
<li> |
68 |
<label>setDescription: </label> |
79 |
<label>setDescription: </label> |
69 |
<textarea style="vertical-align:middle" rows="2" cols="30" name="description">[% desc.description %]</textarea> |
80 |
<textarea style="vertical-align:middle" rows="2" cols="30" name="description">[% desc.description %]</textarea> |
70 |
<a onclick="delDescField(this); return false;" href="#"><i class="fa fa-fw fa-trash"></i> Remove</a> |
81 |
<a class="remove_description" href="#"><i class="fa fa-fw fa-trash"></i> Remove</a> |
71 |
</li> |
82 |
</li> |
72 |
[% END %] |
83 |
[% END %] |
73 |
<li id="adddescription"><span class="label"> </span><a href="#" onclick='newDescField(); return false;'><i class="fa fa-fw fa-plus"></i> Add description</a></li> |
84 |
<li id="adddescription"><span class="label"> </span><a href="#" class="add_description"><i class="fa fa-fw fa-plus"></i> Add description</a></li> |
74 |
|
85 |
|
75 |
</ol> |
86 |
</ol> |
76 |
</fieldset> |
87 |
</fieldset> |
77 |
- |
|
|