bug fix.. list needed container item ids
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Feb 2006 04:03:50 +0000 (04:03 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Feb 2006 04:03:50 +0000 (04:03 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3154 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/copy_buckets.js

index 0b38403..e73731a 100644 (file)
@@ -153,8 +153,6 @@ cat.copy_buckets.prototype = {
                                                        var bucket_id = obj.controller.view.bucket_menulist.value;
                                                        if (!bucket_id) return;
                                                        for (var i = 0; i < obj.copy_ids.length; i++) {
-                                                               var item = obj.flesh_item_for_list( obj.copy_ids[i] );
-                                                               if (!item) continue;
                                                                var bucket_item = new ccbi();
                                                                bucket_item.isnew('1');
                                                                bucket_item.bucket(bucket_id);
@@ -165,6 +163,9 @@ cat.copy_buckets.prototype = {
 
                                                                        if (typeof robj == 'object') throw robj;
 
+                                                                       var item = obj.flesh_item_for_list( obj.copy_ids[i], robj );
+                                                                       if (!item) continue;
+
                                                                        obj.list2.append( item );
                                                                } catch(E) {
                                                                        alert( js2JSON(E) );
@@ -180,8 +181,6 @@ cat.copy_buckets.prototype = {
                                                        for (var i = 0; i < obj.selection_list1.length; i++) {
                                                                var acp_id = obj.selection_list1[i][0];
                                                                //var barcode = obj.selection_list1[i][1];
-                                                               var item = obj.flesh_item_for_list( acp_id );
-                                                               if (!item) continue;
                                                                var bucket_item = new ccbi();
                                                                bucket_item.isnew('1');
                                                                bucket_item.bucket(bucket_id);
@@ -192,6 +191,9 @@ cat.copy_buckets.prototype = {
 
                                                                        if (typeof robj == 'object') throw robj;
 
+                                                                       var item = obj.flesh_item_for_list( acp_id, robj );
+                                                                       if (!item) continue;
+
                                                                        obj.list2.append( item );
                                                                } catch(E) {
                                                                        alert( js2JSON(E) );