Fix unified interface w/ editing multiple volumes collab/phasefx/acn_not_found
authorJason Etheridge <jason@esilibrary.com>
Wed, 7 Sep 2011 07:29:40 +0000 (03:29 -0400)
committerJason Etheridge <jason@esilibrary.com>
Wed, 7 Sep 2011 07:29:40 +0000 (03:29 -0400)
commit4d5c2092cebfd815e4e01032b88e6ba1a69224df
treeed1c9c8972b6e3151f7266406ed78fb7789bbc93
parent6196de645f929a79153a0dd5e4adab01e6a47f36
Fix unified interface w/ editing multiple volumes

Breakage if editing existing items across volumes with non-default values for
call number class, prefix, or suffix.  This was due to some logic happening
within a loop that was sadly referencing data that changed out from under it
with every loop iteration (so for example, we were effectively referencing the
last rendered class menu instead of each in turn).

Remember folks:

for (var unsafe = 0; unsafe < 10; unsafe++) {
    setTimeout(
        function(safe) {
            return function() {
                do_something_with(safe); // good
                do_something_with(unsafe); // bad
            };
        }(unsafe),
        1000
    );
}

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js