Ensure new authority ID subfield is inserted in the correct XUL DOM location
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Feb 2011 05:12:28 +0000 (05:12 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Feb 2011 05:12:28 +0000 (05:12 +0000)
commit4012cac6614523fbc6a2e114035e32aa002799ef
tree8012ef8ea7a76aa8207fcf3dcd5750f63fb886ca
parent06c8794734c68e6e2c2d02d7c7db31c0b0e7d79f
Ensure new authority ID subfield is inserted in the correct XUL DOM location

Addresses LP 712499. After creating an authority via the context menu
in the MARC editor, the new ID subfield ($0) would be created right after
the subfield on which the context menu was invoked. It turns out that it
was being placed in the wrong location, and one symptom was that the
Validate button would not validate the controlled field against the newly
created authority.

Now we hunt through the parent DOM nodes until we find the 'sf_box' element
and then we append the ID subfield to that node. We also eliminate some
duplicate code by defining a common function so that the problem can be
fixed in one stroke...

git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19403 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/xul/staff_client/server/cat/marcedit.js