fixed the No Bucket quick add bug
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Aug 2006 01:36:40 +0000 (01:36 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Aug 2006 01:36:40 +0000 (01:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5636 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul
Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul

index 01850f6..9894cb5 100644 (file)
@@ -69,7 +69,9 @@
                                        listitem.setAttribute('id', robj.copy[i].id());
                                        $('bucket_list').appendChild(listitem);
                                }
-                               $('bucket_list').selectedIndex = 0;
+
+                               try { $('bucket_list').selectedIndex = 0; } catch(E) { }
+
                                $('bucket_list').focus();
 
                        } catch(E) {
                        if (b) {
                                bucket_id = b;
                        } else {
-                               if ($('bucket_list').selectedItem) bucket_id = $('bucket_list').selectedItem.getAttribute('id');
+                               try {
+                                       if ($('bucket_list').selectedItem) bucket_id = $('bucket_list').selectedItem.getAttribute('id');
+                               } catch(E) {
+                               }
                        }
                        if (!bucket_id) return;
                        for (var i = 0; i < g.copy_ids.length; i++) {
index a99f1bd..0aa63aa 100644 (file)
@@ -70,7 +70,7 @@
                                        listitem.setAttribute('id', robj.biblio[i].id());
                                        $('bucket_list').appendChild(listitem);
                                }
-                               $('bucket_list').selectedIndex = 0;
+                               try { $('bucket_list').selectedIndex = 0; } catch(E) { }
                                $('bucket_list').focus();
 
                        } catch(E) {
                        if (b) {
                                bucket_id = b;
                        } else {
-                               if ($('bucket_list').selectedItem) bucket_id = $('bucket_list').selectedItem.getAttribute('id');
+                               try {
+                                       if ($('bucket_list').selectedItem) bucket_id = $('bucket_list').selectedItem.getAttribute('id');
+                               } catch(E) {
+                               }
                        }
                        if (!bucket_id) return;
                        for (var i = 0; i < g.record_ids.length; i++) {