From d56370ca8c484101c11034dfeb42fea1fba8b06b Mon Sep 17 00:00:00 2001 From: phasefx Date: Sat, 29 Apr 2006 16:39:37 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.open-ils.org/ILS/trunk@3970 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/server/cat/bib_brief.xul | 20 +++--- .../staff_client/server/cat/copy_buckets.js | 66 ++++++++++++------- .../staff_client/server/cat/record_buckets.js | 2 +- 3 files changed, 52 insertions(+), 36 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/bib_brief.xul b/Open-ILS/xul/staff_client/server/cat/bib_brief.xul index 07b6794455..8245d37315 100644 --- a/Open-ILS/xul/staff_client/server/cat/bib_brief.xul +++ b/Open-ILS/xul/staff_client/server/cat/bib_brief.xul @@ -116,18 +116,14 @@ - - - - + diff --git a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js index b832bb37b6..f1e0094a40 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js @@ -176,7 +176,7 @@ cat.copy_buckets.prototype = { obj.list2.append( item ); } catch(E) { - alert( js2JSON(E) ); + obj.error.standard_unexpected_error_alert('Addition likely failed.',E); } } } @@ -204,7 +204,7 @@ cat.copy_buckets.prototype = { obj.list2.append( item ); } catch(E) { - alert( js2JSON(E) ); + obj.error.standard_unexpected_error_alert('Deletion likely failed.',E); } } @@ -238,7 +238,7 @@ cat.copy_buckets.prototype = { [ ses(), 'copy', bucket_item_id ]); if (typeof robj == 'object') throw robj; } catch(E) { - alert(js2JSON(E)); + obj.error.standard_unexpected_error_alert('Deletion likely failed.',E); } } setTimeout( @@ -255,14 +255,14 @@ cat.copy_buckets.prototype = { try { var bucket = obj.controller.view.bucket_menulist.value; var name = obj.bucket_id_name_map[ bucket ]; - var conf = prompt('To delete this bucket, re-type its name:','','Delete Bucket'); - if (conf != name) return; + var conf = window.confirm('Delete the bucket named ' + name + '?'); + if (conf) return; obj.list2.clear(); var robj = obj.network.simple_request('BUCKET_DELETE',[ses(),'copy',bucket]); if (typeof robj == 'object') throw robj; obj.controller.render('copy_buckets_menulist_placeholder'); } catch(E) { - alert('FIXME -- ' + E); + obj.error.standard_unexpected_error_alert('Bucket deletion likely failed.',E); } } ], @@ -292,7 +292,7 @@ cat.copy_buckets.prototype = { ); } } catch(E) { - alert( js2JSON(E) ); + obj.error.standard_unexpected_error_alert('Bucket creation failed.',E); } } ], @@ -332,16 +332,34 @@ cat.copy_buckets.prototype = { 'copy_buckets_transfer_to_volume' : [ ['command'], function() { - // FM_ACN_RETRIEVE - obj.data.stash_retrieve(); - if (!obj.data.marked_volume) { - alert('Please mark a volume as the destination from within the copy browser and then try this again.'); - return; - } - var volume = obj.network.simple_request('FM_ACN_RETRIEVE',[ obj.data.marked_volume ]); - // FIXME -- later, show some brief details for the record - var confirm = prompt('Moving copies to volume "' + volume.label() + '". To confirm, please retype the volume label.','','Copy Transfer'); - if (confirm == volume.label()) { + try { + // FM_ACN_RETRIEVE + obj.data.stash_retrieve(); + if (!obj.data.marked_volume) { + alert('Please mark a volume as the destination from within the copy browser and then try this again.'); + return; + } + var volume = obj.network.simple_request('FM_ACN_RETRIEVE',[ obj.data.marked_volume ]); + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite'); + var xml = ''; + xml += 'Transfer the bucket copies from their original volumes to '; + xml += obj.data.hash.aou[ volume.owning_lib() ].shortname() + "'s volume labelled "; + xml += '"' + volume.label() + '" on the following record?'; + xml += '