From b92f045c5ec8b75073c6356eccf1cd9b60e1a427 Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 27 Oct 2009 06:45:58 +0000 Subject: [PATCH] wire up un-cancel hold action in the staff client git-svn-id: svn://svn.open-ils.org/ILS/trunk@14624 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 2 ++ .../server/locale/en-US/patron.properties | 1 + .../xul/staff_client/server/patron/holds.js | 18 ++++++++++++++++++ .../server/patron/holds_overlay.xul | 3 +++ 4 files changed, 24 insertions(+) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 74ac00c121..3cb462e198 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2056,6 +2056,8 @@ + + diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties index 2dc4f2d40c..e58ca1f3a1 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties @@ -171,6 +171,7 @@ staff.patron.holds.holds_cancel.cancel_for_barcodes=For barcodes %1$s, should th staff.patron.holds.holds_cancel.cancel_for_barcodes.title=Cancelling Transits staff.patron.holds.holds_cancel.hold_transits_not_cancelled=Hold transits not likely cancelled. staff.patron.holds.holds_cancel.hold_not_cancelled=Holds not likely cancelled. +staff.patron.holds.holds_uncancel.hold_not_uncancelled=Holds not likely un-cancelled. staff.patron.holds.show_catalog.unknown_htype=I do not understand the hold type of %1$s so I can not display the appropriate record in the catalog. staff.patron.holds.show_catalog.retrieving_title=Retrieving title... staff.patron.holds.lib_menus.missing_library_list=Missing library list. diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 50e829bf18..828f4857b7 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -146,6 +146,7 @@ patron.holds.prototype = { obj.controller.view.cmd_alt_view.setAttribute('disabled','false'); obj.controller.view.cmd_holds_retarget.setAttribute('disabled','false'); obj.controller.view.cmd_holds_cancel.setAttribute('disabled','false'); + obj.controller.view.cmd_holds_uncancel.setAttribute('disabled','false'); obj.controller.view.cmd_show_catalog.setAttribute('disabled','false'); } else { obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','true'); @@ -164,6 +165,7 @@ patron.holds.prototype = { obj.controller.view.cmd_alt_view.setAttribute('disabled','true'); obj.controller.view.cmd_holds_retarget.setAttribute('disabled','true'); obj.controller.view.cmd_holds_cancel.setAttribute('disabled','true'); + obj.controller.view.cmd_holds_uncancel.setAttribute('disabled','true'); obj.controller.view.cmd_show_catalog.setAttribute('disabled','true'); } } @@ -815,6 +817,22 @@ patron.holds.prototype = { } } ], + 'cmd_holds_uncancel' : [ + ['command'], + function() { + try { + JSAN.use('util.functional'); + for (var i = 0; i < obj.retrieve_ids.length; i++) { + var robj = obj.network.simple_request('FM_AHR_UNCANCEL',[ ses(), obj.retrieve_ids[i].id]); + if (typeof robj.ilsevent != 'undefined') throw(robj); + } + obj.clear_and_retrieve(); + } catch(E) { + obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_uncancel.hold_not_uncancelled'),E); + } + } + ], + 'cmd_retrieve_patron' : [ ['command'], function() { diff --git a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul index 6a1f201c46..e462425a80 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul @@ -31,6 +31,7 @@