Bug 23202: Fix screen freeze when ordereing several items
This patch fixes adding multiple items on order acquisitions The error is: Uncaught TypeError: $(...).parent(...).attr(...) is undefined Test plan: 1) Set dateaccessioned.pl plugin to ACQ framework's 952$d field. 2) Create basket to a vendor and add order from a new empty record. 3) Add date acquired value from calendar. 4) Add multiple items and see that the view freezes. 5) Apply the patch 6) Reload the page and repeat the steps 3 and 4. 7) See that the items are added. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> JD Amended patch: adjust commit title Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (cherry picked from commitd2d78e2581) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commitcf96c9802a) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
parent
6c423f10d5
commit
369b1f724b
|
|
@ -192,7 +192,7 @@ function cloneItemBlock(index, unique_item_fields, callback) {
|
|||
$(original).find("input[name='field_value']").each(function(){
|
||||
var kohafield = $(this).siblings("input[name='kohafield']").val();
|
||||
if($(this).val() && $.inArray(kohafield,dont_copy_fields) == -1) {
|
||||
$(this).parent("div").attr("id").match(/^(subfield.)/);
|
||||
$(this).closest("li div").attr("id").match(/^(subfield.)/);
|
||||
var id = RegExp.$1;
|
||||
var value = $(this).val();
|
||||
$(clone).find("div[id^='"+id+"'] input[name='field_value']").val(value);
|
||||
|
|
|
|||
Loading…
Reference in New Issue