Bug 35383: Make subfields of repeated tags draggable

To reproduce:
1. Open any biblio and edit that record.
   (select "Edit record" from the "Edit" drop-down menu).
2. Repeat any tag that may be repeated and has more than one subfield
   (e.g. 050 or 082) (click "Repeat this tag")
3. Try dragging a subfield of the new repeated tag

Apply the patch and make sure dragging a subfield works well.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Slava Shishkin 2023-11-20 18:32:51 +02:00 committed by Katrin Fischer
parent 6c8ad081a6
commit e99037989b
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -324,6 +324,12 @@ function CloneField(index, hideMarc, advancedMARCEditor) {
// insert this line on the page
original.parentNode.insertBefore(clone,original.nextSibling);
$(clone).find("ul.sortable_subfield").each((i, e) => {
Sortable.create(e, {
animation: 150,
});
});
Select2Utils.initSelect2($(original).find('select'));
Select2Utils.initSelect2($(clone).find('select'));
}