From: phasefx Date: Tue, 9 Feb 2010 22:11:51 +0000 (+0000) Subject: entry points for Transfer Title Holds functionality X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0386fe6ad8ac659df9d596c96a796ad8f6eb8ea1;p=evergreen%2Fbjwebb.git entry points for Transfer Title Holds functionality git-svn-id: svn://svn.open-ils.org/ILS/trunk@15487 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index e977178db..64df98f60 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -271,6 +271,10 @@ + + + + @@ -2166,6 +2170,8 @@ + + @@ -2438,6 +2444,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 3035ceb94..a2518cf19 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -348,11 +348,53 @@ function mark_for_overlay() { g.data.stash('marked_record_mvr'); if (g.data.marked_record_mvr) { alert(document.getElementById('offlineStrings').getFormattedString('cat.opac.record_marked_for_overlay.tcn.alert',[ g.data.marked_record_mvr.tcn() ])); + xulG.set_statusbar(1, $("offlineStrings").getFormattedString('staff.cat.z3950.marked_record_for_overlay_indicator.tcn.label',[g.data.marked_record_mvr.tcn()]) ); } else { alert(document.getElementById('offlineStrings').getFormattedString('cat.opac.record_marked_for_overlay.record_id.alert',[ g.data.marked_record ])); + xulG.set_statusbar(1, $("offlineStrings").getFormattedString('staff.cat.z3950.marked_record_for_overlay_indicator.record_id.label',[g.data.marked_record]) ); } } +function mark_for_hold_transfer() { + g.data.marked_record_for_hold_transfer = docid; + g.data.stash('marked_record_for_hold_transfer'); + var robj = g.network.simple_request('MODS_SLIM_RECORD_RETRIEVE.authoritative',[docid]); + if (typeof robj.ilsevent == 'undefined') { + g.data.marked_record_for_hold_transfer_mvr = robj; + } else { + g.data.marked_record_for_hold_transfer_mvr = null; + g.error.standard_unexpected_error_alert('in mark_for_hold_transfer',robj); + } + g.data.stash('marked_record_for_hold_transfer_mvr'); + if (g.data.marked_record_mvr) { + var m = $("offlineStrings").getFormattedString('staff.cat.opac.marked_record_for_hold_transfer_indicator.tcn.label',[g.data.marked_record_for_hold_transfer_mvr.tcn()]); + alert(m); xulG.set_statusbar(1, m ); + } else { + var m = $("offlineStrings").getFormattedString('staff.cat.opac.marked_record_for_hold_transfer_indicator.record_id.label',[g.data.marked_record_for_hold_transfer]); + alert(m); xulG.set_statusbar(1, m ); + } +} + +function transfer_title_holds() { + g.data.stash_retrieve(); + var target = g.data.marked_record_for_hold_transfer; + if (!target) { + var m = $("offlineStrings").getString('staff.cat.opac.title_for_hold_transfer.destination_needed.label'); + alert(m); + return; + } + var robj = g.network.simple_request('TRANSFER_TITLE_HOLDS',[ ses(), target, [ docid ] ]); + if (robj == 1) { + var m = $("offlineStrings").getString('staff.cat.opac.title_for_hold_transfer.success.label'); + alert(m); + } else { + var m = $("offlineStrings").getString('staff.cat.opac.title_for_hold_transfer.failure.label'); + alert(m); + } + hold_browser_reset = true; + if (g.view == 'hold_browser') { set_hold_browser(); }; +} + function delete_record() { if (g.error.yns_alert( document.getElementById('offlineStrings').getFormattedString('cat.opac.delete_record.confirm', [docid]), diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul index d03f7a64f..7f0fdbb03 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul @@ -56,6 +56,8 @@ + + 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 4e541a2c9..33f4a8141 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -123,6 +123,7 @@ const api = { 'FM_AHR_UPDATE_BATCH' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.update.batch' }, 'FM_AHR_RESET' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.reset' }, 'FM_AHR_STATUS' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.status.retrieve' }, + 'TRANSFER_TITLE_HOLDS' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.change_title' }, 'FM_AHRCC_PCRUD_SEARCH' : { 'app' : 'open-ils.pcrud', 'method' : 'open-ils.pcrud.search.ahrcc.atomic', 'secure' : false }, 'FM_AIHU_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.in_house_use.create' }, 'FM_ANCC_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.non_cataloged_circulation.retrieve' }, diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index e34b18ce3..9085913fc 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -1339,6 +1339,10 @@ main.menu.prototype = { content_params.open_chrome_window = function(a,b,c) { return xulG.window.open(a,b,c); }; content_params.url_prefix = function(url) { return obj.url_prefix(url); }; content_params.network_meter = obj.network_meter; + content_params.set_statusbar = function(slot,text) { + var e = document.getElementById('statusbarpanel'+slot); + if (e) { e.setAttribute('label',text); } + }; content_params.chrome_xulG = xulG; if (params && params.tab_name) content_params.set_tab_name( params.tab_name ); diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul index 4723b6050..795d6d297 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul @@ -41,6 +41,11 @@ + + + + + diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties index fd9b5b9c4..42df113f9 100644 --- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties +++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties @@ -250,3 +250,11 @@ staff.cat.util.copy_editor.edit=Edit staff.cat.util.copy_editor.view=View staff.circ.copy_status.add_volumes.perm_failure=You do not have permission to add volumes to the workstation library. staff.circ.copy_status.add_volumes.title=Add Volume/Item for Record # %1$s +staff.cat.z3950.marked_record_for_overlay_indicator.tcn.label=Record with TCN %1$s marked for overlay. +staff.cat.z3950.marked_record_for_overlay_indicator.record_id.label=Record with ID %1$s marked for overlay. +staff.cat.opac.marked_record_for_hold_transfer_indicator.tcn.label=Record with TCN %1$s marked for title hold transfer. +staff.cat.opac.marked_record_for_hold_transfer_indicator.record_id.label=Record with ID %1$s marked for title hold transfer. +staff.cat.opac.title_for_hold_transfer.destination_needed.label=Need to mark a record as a Title Hold Transfer Destination first. +staff.cat.opac.title_for_hold_transfer.success.label=Holds transferred. +staff.cat.opac.title_for_hold_transfer.failure.label=Holds not transferred. + 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 21abc2aae..814f8af7b 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets.js @@ -341,6 +341,7 @@ cat.record_buckets.prototype = { obj.controller.view.cmd_merge_records.setAttribute('disabled','true'); obj.controller.view.cmd_delete_records.setAttribute('disabled','true'); obj.controller.view.cmd_sel_opac.setAttribute('disabled','true'); + obj.controller.view.cmd_transfer_title_holds.setAttribute('disabled','true'); obj.controller.view.record_buckets_list_actions.disabled = true; var bucket = obj.network.simple_request( 'BUCKET_FLESH', @@ -361,6 +362,7 @@ cat.record_buckets.prototype = { obj.controller.view.cmd_merge_records.setAttribute('disabled','false'); obj.controller.view.cmd_delete_records.setAttribute('disabled','false'); obj.controller.view.cmd_sel_opac.setAttribute('disabled','false'); + obj.controller.view.cmd_transfer_title_holds.setAttribute('disabled','false'); obj.controller.view.record_buckets_list_actions.disabled = false; var x = document.getElementById('info_box'); @@ -550,6 +552,7 @@ cat.record_buckets.prototype = { obj.controller.view.cmd_merge_records.setAttribute('disabled','true'); obj.controller.view.cmd_delete_records.setAttribute('disabled','true'); obj.controller.view.cmd_sel_opac.setAttribute('disabled','true'); + obj.controller.view.cmd_transfer_title_holds.setAttribute('disabled','true'); obj.controller.view.record_buckets_list_actions.disabled = true; obj.controller.render('record_buckets_menulist_placeholder'); setTimeout( @@ -846,6 +849,26 @@ cat.record_buckets.prototype = { } } ], + 'cmd_transfer_title_holds' : [ + ['command'], + function() { + try { + obj.list2.select_all(); + JSAN.use('util.functional'); + var docids = util.functional.map_list( + obj.list2.dump_retrieve_ids(), + function (o) { + return JSON2js(o).docid; // docid + } + ); + JSAN.use('cat.util'); + cat.util.transfer_title_holds(docids); + } catch(E) { + alert('Error in record_buckets.js, cmd_transfer_title_holds: ' + E); + } + } + ], + 'record_buckets_export_records' : [ ['render'], function(){} ], 'record_buckets_list_actions' : [ ['render'], function(){} ] } diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets.xul b/Open-ILS/xul/staff_client/server/cat/record_buckets.xul index 6d5098507..18454f211 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets.xul +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets.xul @@ -86,49 +86,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul b/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul index 22d966d62..3f564f663 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul @@ -10,7 +10,54 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -166,6 +213,7 @@