From: Jason Etheridge Date: Thu, 21 Jul 2011 19:25:28 +0000 (-0400) Subject: lp#792595: Don't allow pre-cats into record buckets via Item Status -> Actions for... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8dc4efabe721f0fadcf4163130c72be351c5d78e;p=evergreen%2Ftadl.git lp#792595: Don't allow pre-cats into record buckets via Item Status -> Actions for Catalogers Alerts with the number of pre-cat records skipped prior to invoking the title bucket dialog. Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index 215d048c68..ff6a261e62 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -297,14 +297,29 @@ cat.util.add_copies_to_bucket = function(selection_list) { cat.util.add_titles_to_bucket = function(record_ids) { JSAN.use('util.window'); var win = new util.window(); - win.open( - xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK), - '_blank', - 'chrome,resizable,modal,center', - { - record_ids: record_ids + JSAN.use('util.functional'); + var filtered_record_ids = util.functional.filter_list( + record_ids, + function(o) { + return o != -1; // don't allow the magic pre-cat bib } ); + if (filtered_record_ids.length != record_ids.length) { + alert($("catStrings").getFormattedString( + 'staff.cat.util.add_titles_to_bucket.number_of_precats_skipped', + [ record_ids.length - filtered_record_ids.length ] + )); + } + if (filtered_record_ids.length > 0) { + win.open( + xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK), + '_blank', + 'chrome,resizable,modal,center', + { + record_ids: filtered_record_ids + } + ); + } } cat.util.spawn_copy_editor = function(params) { diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties index edf3aad3e6..3be182d019 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties @@ -402,6 +402,7 @@ staff.cat.util.mark_item_missing_pieces.marking_error=Error marking item %1$s as staff.cat.util.mark_item_missing_pieces.one_item_missing_pieces=Item marked as missing pieces. staff.cat.util.mark_item_missing_pieces.multiple_item_missing_pieces=%1$s items marked as missing pieces. staff.cat.util.mark_item_missing_pieces.circ_not_found=No circulation found for item with barcode %1$s. Item left unmodified. +staff.cat.util.add_titles_to_bucket.number_of_precats_skipped=Skipping %1$s pre-cat records... staff.cat.volume_buckets.window_tab_name=Volume Buckets staff.cat.volume_copy_creator.my_init.btn.label=Apply