From dd83adf2ee2453b6765f14cd3de2228bc7edd68a Mon Sep 17 00:00:00 2001 From: pines Date: Tue, 22 Aug 2006 01:36:40 +0000 Subject: [PATCH] fixed the No Bucket quick add bug 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 | 9 +++++++-- Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul b/Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul index 01850f6be9..9894cb54ee 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul @@ -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) { @@ -105,7 +107,10 @@ 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++) { diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul b/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul index a99f1bd106..0aa63aa908 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul @@ -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) { @@ -106,7 +106,10 @@ 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++) { -- 2.11.0