From: phasefx Date: Sun, 15 Jul 2007 03:04:42 +0000 (+0000) Subject: option for batch record deletion in bucket interface X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a78c30983610e0544a01af215a92b8b31fa27797;p=Evergreen.git option for batch record deletion in bucket interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@7552 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 2ee34b1575..c33a5f190c 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -110,6 +110,7 @@ const api = { 'FM_BRE_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record.metadata.retrieve', 'secure' : false }, 'FM_BRE_ID_SEARCH_VIA_BARCODE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.find_by_barcode', 'secure' : false }, 'FM_BRE_ID_SEARCH_VIA_TCN' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.tcn', 'secure' : false }, + 'FM_BRE_DELETE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record_entry.delete', 'secure' : false }, 'FM_BRN_FROM_MARCXML' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.z3950.marcxml_to_brn', 'secure' : false }, 'FM_CCS_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.config.copy_status.retrieve.all', 'secure' : false }, 'FM_CIRC_DETAILS' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.fleshed.retrieve' }, diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets.js b/Open-ILS/xul/staff_client/server/cat/record_buckets.js index c11fe24305..0da10d2e9e 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets.js @@ -550,6 +550,81 @@ cat.record_buckets.prototype = { } ], + + 'cmd_delete_records' : [ + ['command'], + function() { + try { + obj.list2.select_all(); + obj.data.stash_retrieve(); + JSAN.use('util.functional'); + + var record_ids = util.functional.map_list( + obj.list2.dump_retrieve_ids(), + function (o) { + return JSON2js(o).docid; // docid + } + ); + + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite'); + var top_xml = ''; + top_xml += 'Delete these records? (Select the "lead" record first)'; + top_xml += '