From: phasefx Date: Thu, 7 Jan 2010 22:13:02 +0000 (+0000) Subject: Backporting changeset 15271 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2f04eee5d0a1ab98106f7a7abf94f57991e47c33;p=working%2FEvergreen.git Backporting changeset 15271 Bucket related enhancements: * Add to Record Bucket action for Item Status interface * Authoritative methods in bucket interfaces immune to database replication lag * Removed a CGI param for better caching of the quick Add to Record Bucket interface * Added a cat.util.add_titles_to_bucket utility method (but forgot to put it into cat.util.EXPORT_OK, though harmless) git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@15272 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm index 91676172a4..c2eda9e0b6 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm @@ -37,6 +37,7 @@ sub _sort_buckets { __PACKAGE__->register_method( method => "bucket_retrieve_all", api_name => "open-ils.actor.container.all.retrieve_by_user", + authoritative => 1, notes => <<" NOTES"); Retrieves all un-fleshed buckets assigned to given user PARAMS(authtoken, bucketOwnerId) @@ -65,6 +66,7 @@ sub bucket_retrieve_all { __PACKAGE__->register_method( method => "bucket_flesh", api_name => "open-ils.actor.container.flesh", + authoritative => 1, argc => 3, ); diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 82f1b933e7..d5eeee3e93 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -1757,6 +1757,8 @@ + + diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index 12018b0439..fc5a9ce28b 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -249,10 +249,12 @@ function remove_me() { function add_to_bucket() { JSAN.use('util.window'); var win = new util.window(); win.open( - xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK) - + '?record_ids=' + js2JSON( [ docid ] ), + xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK), 'sel_bucket_win' + win.window_name_increment(), - 'chrome,resizable,modal,center' + 'chrome,resizable,modal,center', + { + record_ids: [ docid ] + } ); } 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 20d91c4024..03f5a6c0ce 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -48,9 +48,9 @@ const api = { 'BLOB_MOBTS_CIRC_MVR_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.have_balance.fleshed' }, 'BLOB_MOBTS_CIRC_MVR_OPEN' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.fleshed' }, 'BUCKET_CREATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.create' }, - 'BUCKET_FLESH' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.flesh' }, + 'BUCKET_FLESH' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.flesh.authoritative' }, 'BUCKET_DELETE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.full_delete' }, - 'BUCKET_RETRIEVE_VIA_USER' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.all.retrieve_by_user' }, + 'BUCKET_RETRIEVE_VIA_USER' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.all.retrieve_by_user.authoritative' }, 'BUCKET_ITEM_CREATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.item.create' }, 'BUCKET_ITEM_DELETE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.item.delete' }, 'CAPTURE_COPY_FOR_HOLD_VIA_BARCODE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.capture_copy.barcode' }, 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 10ec0a09e6..4d5a0252b3 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 @@ -48,10 +48,11 @@ g.record_ids = xul_param( 'record_ids',{ 'concat' : true, + 'modal_xulG' : true, 'JSON2js_if_cgi' : true, 'JSON2js_if_xpcom' : true, 'stash_name':'rb_temp_record_ids', - 'clear_xpcom' : true, + 'clear_xpcom' : true } ); diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index 0a73e17f82..59ec7fb1af 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -231,6 +231,18 @@ 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), + 'sel_bucket_win' + win.window_name_increment(), + 'chrome,resizable,modal,center', + { + record_ids: record_ids + } + ); +} + cat.util.spawn_copy_editor = function(params) { try { if (!params.copy_ids && !params.copies) return; diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.js b/Open-ILS/xul/staff_client/server/circ/copy_status.js index a247949a0c..e623ea424d 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.js +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.js @@ -58,6 +58,7 @@ circ.copy_status.prototype = { obj.controller.view.sel_edit.setAttribute('disabled','true'); obj.controller.view.sel_opac.setAttribute('disabled','true'); obj.controller.view.sel_bucket.setAttribute('disabled','true'); + obj.controller.view.sel_record_bucket.setAttribute('disabled','true'); obj.controller.view.sel_copy_details.setAttribute('disabled','true'); obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','true'); obj.controller.view.sel_mark_items_missing.setAttribute('disabled','true'); @@ -82,6 +83,7 @@ circ.copy_status.prototype = { obj.controller.view.sel_opac.setAttribute('disabled','false'); obj.controller.view.sel_patron.setAttribute('disabled','false'); obj.controller.view.sel_bucket.setAttribute('disabled','false'); + obj.controller.view.sel_record_bucket.setAttribute('disabled','false'); obj.controller.view.sel_copy_details.setAttribute('disabled','false'); obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','false'); obj.controller.view.sel_mark_items_missing.setAttribute('disabled','false'); @@ -274,6 +276,19 @@ circ.copy_status.prototype = { cat.util.add_copies_to_bucket(obj.selection_list); } ], + 'sel_record_bucket' : [ + ['command'], + function() { + JSAN.use('cat.util'); JSAN.use('util.functional'); + cat.util.add_titles_to_bucket( + util.functional.map_list( + obj.selection_list, function (o) { + return o.doc_id; + } + ) + ); + } + ], 'copy_status_barcode_entry_textbox' : [ ['keypress'], function(ev) { diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.xul b/Open-ILS/xul/staff_client/server/circ/copy_status.xul index 147da120d4..a7d279bd86 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.xul +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.xul @@ -112,6 +112,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul index 333f7255cc..ef6f4e5b12 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul +++ b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul @@ -13,6 +13,7 @@ + @@ -39,6 +40,7 @@ + @@ -110,6 +112,7 @@ + @@ -140,6 +143,7 @@ +