Fix unified interface w/ editing multiple volumes collab/phasefx/acn_not_found_rel_2_1
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 20:34:29 +0000 (16:34 -0400)
commit83a161308839f580979e66d170d7bfe97fc31af2
tree7e6a3d4de6198bb24b2a6e73c9b716fba324b36c
parentb1dc9eb9e6d1ba02a6b4100108bf358bbd6d5b00
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