Change the default pull list interface and show the total # of holds available for...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Dec 2009 20:28:55 +0000 (20:28 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Dec 2009 20:28:55 +0000 (20:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15227 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/holds_overlay.xul

index 010b325..c253ea1 100644 (file)
@@ -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',
index e394d1f..71e4da5 100644 (file)
@@ -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 } );
                 }
index cf6cf82..d46ac0c 100644 (file)
@@ -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
index 6cc7f0a..cca056b 100644 (file)
@@ -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 );
index 7ab83a6..967d63d 100644 (file)
             <button command="cmd_uncancelled_holds_view" label="&staff.patron.holds_overlay.show_uncancelled_holds.label;" accesskey="&staff.patron.holds_overlay.show_uncancelled_holds.accesskey;"/>
         </deck>
         <button id="fetch_more" label="&staff.patron.holds_overlay.fetch_more.label;" accesskey="&staff.patron.holds_overlay.fetch_more.accesskey;" hidden="true"/>
+        <vbox pack="center"><label id="hold_count" hidden="true" /></vbox>
         <spacer flex="1"/>
         <progressmeter id="progress" type="determined" hidden="true" />
         <button id="alt_view_btn" command="cmd_alt_view" />