]> git.koha-community.org Git - koha.git/commit
Bug 17817: Fix cloning subfields using select2
authorPatricio Marrone <pmarrone@unc.edu.ar>
Tue, 10 Jan 2017 18:53:33 +0000 (15:53 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 13 Jan 2017 11:23:00 +0000 (11:23 +0000)
commitcc26863d355fb9524ed90aba7c03c53115641900
treeaa1f9e20ba4eaf98e85fe11b80888037b7ac387c
parent7638a33aafacf006d2547724e9e172b8c6d8f9b8
Bug 17817: Fix cloning subfields using select2

Based on Jonathan's patch (the DO NOT PUSH one), I put together this fix.
What was changed is that select2 is reinitialized only after the cloned element
has been appended to the DOM (so that select2 can correctly calculate the field's
width). Also, I changed the selectors that searched for the line divs (for reordering)
and for the subfield's input element (for erasing the field's value) to be more specific,
since select2 introduced divs that broke some assumptions about the expected HTML structure

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I confirm that these 2 patches fix the add item and mod biblio views as
well as the batch item modification tools.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/js/cataloging.js