From d4f7697299fbe651bd95ca316857c44d426634db Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 22 Dec 2009 20:28:55 +0000 Subject: [PATCH] Change the default pull list interface and show the total # of holds available for pulling git-svn-id: svn://svn.open-ils.org/ILS/trunk@15227 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/chrome/content/main/constants.js | 4 +++- .../xul/staff_client/chrome/content/main/menu.js | 2 +- .../server/locale/en-US/patron.properties | 1 + Open-ILS/xul/staff_client/server/patron/holds.js | 14 +++++++++++++- .../staff_client/server/patron/holds_overlay.xul | 1 + 5 files changed, 19 insertions(+), 3 deletions(-) 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 010b325691..c253ea1f05 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -111,6 +111,7 @@ const api = { 'FM_AHR_RETRIEVE_VIA_PICKUP_AOU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.retrieve_by_pickup_lib' }, 'FM_AHR_ID_LIST_RETRIEVE_VIA_PICKUP_AOU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.id_list.retrieve_by_pickup_lib' }, 'FM_AHR_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.retrieve' }, + 'FM_AHR_PULL_LIST_COUNT' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.retrieve.count' }, 'FM_AHR_ID_LIST_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.id_list.retrieve', 'secure' : false }, 'FM_AHR_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.on_shelf.retrieve' }, 'FM_AHR_ID_LIST_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.on_shelf.retrieve', 'secure' : false }, @@ -322,7 +323,8 @@ const urls = { 'XUL_DEBUG_XULEDITOR' : '/xul/server/util/xuledit.xul', 'XUL_FANCY_PROMPT' : '/xul/server/util/fancy_prompt.xul', 'XUL_HOLD_CAPTURE' : '/xul/server/circ/hold_capture.xul', - 'XUL_HOLD_PULL_LIST' : '/xul/server/admin/hold_pull_list.xhtml', + /*'XUL_HOLD_PULL_LIST' : '/xul/server/admin/hold_pull_list.xhtml',*/ + 'XUL_HOLD_PULL_LIST' : '/xul/server/patron/holds.xul', 'XUL_HOLDS_BROWSER' : '/xul/server/patron/holds.xul', 'XUL_HOLD_DETAILS' : '/xul/server/patron/hold_details.xul', 'XUL_HOLD_CANCEL' : '/xul/server/patron/hold_cancel.xul', 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 e394d1f898..71e4da590b 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -441,7 +441,7 @@ main.menu.prototype = { function() { obj.data.stash_retrieve(); var loc = urls.XUL_BROWSER + '?url=' + window.escape( - obj.url_prefix(urls.XUL_HOLD_PULL_LIST) + '?ses='+window.escape(ses()) + obj.url_prefix(urls.XUL_HOLD_PULL_LIST) ); obj.set_tab( loc, {'tab_name' : offlineStrings.getString('menu.cmd_browse_hold_pull_list.tab')}, { 'show_print_button' : true } ); } 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 cf6cf825c4..d46ac0cfae 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 @@ -131,6 +131,7 @@ staff.patron.hold_notes.new_note.not_created=The note was not likely created. staff.patron.holds.init.hold_num_error=Error retrieving details for hold #%1$s staff.patron.holds.show_notifications.error_rendering_notifs=Error rendering or retrieving hold notifications. +staff.patron.holds.total_count=Total Holds: %1$s staff.patron.holds.holds_edit_selection_depth.choose_hold_range=Please choose a Hold Range: staff.patron.holds.holds_edit_selection_depth.done.label=Done staff.patron.holds.holds_edit_selection_depth.done.accesskey=D diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 6cc7f0a85b..cca056b15a 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -1315,7 +1315,19 @@ patron.holds.prototype = { default: method = 'FM_AHR_ID_LIST_PULL_LIST'; params.push( obj.pull_from_shelf_interface.current.limit ); params.push( obj.pull_from_shelf_interface.current.offset ); - //obj.controller.view.cmd_retrieve_patron.setAttribute('hidden','false'); + var x = document.getElementById('hold_count'); + if (x) { + obj.network.simple_request('FM_AHR_PULL_LIST_COUNT',[ses()],function(req) { + var count = req.getResultObject(); + if (typeof count.ilsevent == 'undefined' && count != null) { + x.setAttribute('value', document.getElementById('patronStrings').getFormattedString( + 'staff.patron.holds.total_count', + [ count ] + )); + x.hidden = false; + } + }); + } break; } var robj = obj.network.simple_request( method, params ); 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 7ab83a609c..967d63d845 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul @@ -116,6 +116,7 @@