Bug 18183: jQuery append error related to script tags in cloneItemBlock
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 28 Feb 2017 13:26:22 +0000 (14:26 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 2 Jan 2018 14:46:40 +0000 (11:46 -0300)
commit5baf823935848a43bdcd7ed63449084075f54d47
tree7d673265e2238ca046e479d4016a3a644766a06e
parent78462ff16faef5d7f24181c79cc53d10db29d75e
Bug 18183: jQuery append error related to script tags in cloneItemBlock

See the detailed explanation of the error on Bugzilla.
As a workaround, we move the append of clone to outeritemblock before the
append of data (long string with item fields and script tags) to clone.

This patch also moves two vars inside the success function, since they are
not used outside of it.

Test plan:
[1] Set AcqCreateItem to receiving.
[2] Receive an order. Verify that adding, updating or deleting an item block
    still works as expected.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/js/additem.js