quick copy buckets from copy browser
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Jun 2006 14:54:01 +0000 (14:54 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Jun 2006 14:54:01 +0000 (14:54 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4837 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/copy_browser.js
Open-ILS/xul/staff_client/server/cat/util.js

index d43f054..e8d9ced 100644 (file)
@@ -148,14 +148,10 @@ cat.copy_browser.prototype = {
                                                                                        return o.split(/_/)[1];
                                                                                }
                                                                        );
-                                                                       
-                                                                       JSAN.use('util.window'); var win = new util.window();
-                                                                       win.open( 
-                                                                               xulG.url_prefix(urls.XUL_COPY_BUCKETS) 
-                                                                               + '?copy_ids=' + js2JSON( list ),
-                                                                               'sel_bucket_win' + win.window_name_increment(),
-                                                                               'chrome,resizable,modal,center'
-                                                                       );
+                                                               
+                                                                       JSAN.use('cat.util');
+                                                                       cat.util.add_copies_to_bucket( list );
+
                                                                } catch(E) {
                                                                        obj.error.standard_unexpected_error_alert('copy browser -> add copies to bucket',E);
                                                                }
index 647fc01..5dfa04f 100644 (file)
@@ -62,7 +62,11 @@ cat.util.add_copies_to_bucket = function(selection_list) {
                util.functional.map_list(
                        selection_list,
                        function (o) {
-                               return o.copy_id;
+                               if (typeof o.copy_id != 'undefined' && o.copy_id != null) {
+                                       return o.copy_id;
+                               } else {
+                                       return o;
+                               }
                        }
                )
        );