]> git.evergreen-ils.org Git - Evergreen.git/commit
Fix unified interface w/ editing multiple volumes
authorJason Etheridge <jason@esilibrary.com>
Wed, 7 Sep 2011 07:29:40 +0000 (03:29 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 7 Sep 2011 20:23:20 +0000 (16:23 -0400)
commit42c33a3af8727ff8d0f12490438816e5cf84e2a3
tree0671c366b50b13c5e7ecc7381974b381e3e8c567
parent84a47bebf522f5d38e2c22ae84160099bbd1128d
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>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js