[open-ils-commits] r14682 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/main xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Oct 29 15:46:54 EDT 2009


Author: phasefx
Date: 2009-10-29 15:46:48 -0400 (Thu, 29 Oct 2009)
New Revision: 14682

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
   trunk/Open-ILS/xul/staff_client/server/patron/holds.js
   trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
Log:
toggle for displaying normal holds and cancelled holds in patron display

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-10-29 18:55:18 UTC (rev 14681)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-10-29 19:46:48 UTC (rev 14682)
@@ -2589,6 +2589,10 @@
 <!ENTITY staff.patron.holds_overlay.print.accesskey "P">
 <!ENTITY staff.patron.holds_overlay.place_hold.label "Place Hold">
 <!ENTITY staff.patron.holds_overlay.place_hold.accesskey "H">
+<!ENTITY staff.patron.holds_overlay.show_cancelled_holds.label "Show Cancelled Holds">
+<!ENTITY staff.patron.holds_overlay.show_cancelled_holds.accesskey "">
+<!ENTITY staff.patron.holds_overlay.show_uncancelled_holds.label "Show Un-Cancelled Holds">
+<!ENTITY staff.patron.holds_overlay.show_uncancelled_holds.accesskey "">
 <!ENTITY staff.patron.info_group.clone.label "Register a New Group Member by Cloning Selected Patrons">
 <!ENTITY staff.patron.info_group.clone.accesskey "N">
 <!ENTITY staff.patron.info_group.remove.accesskey "R">

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2009-10-29 18:55:18 UTC (rev 14681)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2009-10-29 19:46:48 UTC (rev 14682)
@@ -102,6 +102,8 @@
     'FM_AHR_RETRIEVE_VIA_AU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.retrieve' },
     'FM_AHR_ID_LIST_RETRIEVE_VIA_AU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.id_list.retrieve' },
     'FM_AHR_ID_LIST_RETRIEVE_VIA_AU.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.id_list.retrieve.authoritative' },
+    'FM_AHR_CANCELLED_ID_LIST_RETRIEVE_VIA_AU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.canceled.id_list.retrieve' },
+    'FM_AHR_CANCELLED_ID_LIST_RETRIEVE_VIA_AU.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.canceled.id_list.retrieve.authoritative' },
     'FM_AHR_RETRIEVE_VIA_BRE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.open_holds.retrieve' },
     'FM_AHR_RETRIEVE_ALL_VIA_BRE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.retrieve_all_from_title' },
     'FM_AHR_RETRIEVE_VIA_PICKUP_AOU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.retrieve_by_pickup_lib' },

Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2009-10-29 18:55:18 UTC (rev 14681)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2009-10-29 19:46:48 UTC (rev 14682)
@@ -229,6 +229,30 @@
                             }
                         },
                     ],
+                    'cmd_cancelled_holds_view' : [
+                        ['command'],
+                        function(ev) {
+                            document.getElementById('show_cancelled_deck').selectedIndex = 1;
+                            /* For some reason attribute propogation on the <command> element isn't working with hidden */
+                            document.getElementById('holds_cancel_btn').setAttribute('hidden','true');
+                            document.getElementById('holds_uncancel_btn').setAttribute('hidden','false');
+                            document.getElementById('holds_cancel_btn2').setAttribute('hidden','true');
+                            document.getElementById('holds_uncancel_btn2').setAttribute('hidden','false');
+                            obj.clear_and_retrieve();
+                        }
+                    ],
+                    'cmd_uncancelled_holds_view' : [
+                        ['command'],
+                        function(ev) {
+                            document.getElementById('show_cancelled_deck').selectedIndex = 0;
+                            /* For some reason attribute propogation on the <command> element isn't working with hidden */
+                            document.getElementById('holds_cancel_btn').setAttribute('hidden','false');
+                            document.getElementById('holds_uncancel_btn').setAttribute('hidden','true');
+                            document.getElementById('holds_cancel_btn2').setAttribute('hidden','false');
+                            document.getElementById('holds_uncancel_btn2').setAttribute('hidden','true');
+                            obj.clear_and_retrieve();
+                        }
+                    ],
                     'sel_mark_items_damaged' : [
                         ['command'],
                         function() {
@@ -1032,6 +1056,7 @@
         var x_lib_type_menu = document.getElementById('lib_type_menu');
         var x_lib_menu_placeholder = document.getElementById('lib_menu_placeholder');
         var x_lib_filter_checkbox = document.getElementById('lib_filter_checkbox');
+        var x_show_cancelled_deck = document.getElementById('show_cancelled_deck');
         switch(obj.hold_interface_type) {
             case 'shelf':
                 obj.render_lib_menus({'pickup_lib':true});
@@ -1054,6 +1079,7 @@
                 if (x_fetch_more) x_fetch_more.hidden = true;
                 if (x_lib_type_menu) x_lib_type_menu.hidden = true;
                 if (x_lib_menu_placeholder) x_lib_menu_placeholder.hidden = true;
+                if (x_show_cancelled_deck) x_show_cancelled_deck.hidden = false;
             break;
         }
         setTimeout( // We do this because render_lib_menus above creates and appends a DOM node, but until this thread exits, it doesn't really happen
@@ -1076,6 +1102,7 @@
                 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');
             }, 0
         );
@@ -1131,7 +1158,11 @@
             var method; var params = [ ses() ];
             switch(obj.hold_interface_type) {
                 case 'patron' :
-                    method = 'FM_AHR_ID_LIST_RETRIEVE_VIA_AU.authoritative';
+                    if (document.getElementById('show_cancelled_deck').selectedIndex == 0) {
+                        method = 'FM_AHR_ID_LIST_RETRIEVE_VIA_AU.authoritative';
+                    } else {
+                        method = 'FM_AHR_CANCELLED_ID_LIST_RETRIEVE_VIA_AU.authoritative';
+                    }
                     params.push( obj.patron_id );
                     obj.controller.view.cmd_retrieve_patron.setAttribute('hidden','true');
                 break;

Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul	2009-10-29 18:55:18 UTC (rev 14681)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul	2009-10-29 19:46:48 UTC (rev 14682)
@@ -36,6 +36,8 @@
     <command id="cmd_search_opac" />
     <command id="save_columns" />
     <command id="cmd_alt_view" />
+    <command id="cmd_cancelled_holds_view" />
+    <command id="cmd_uncancelled_holds_view" />
     </commandset>
 
     <popupset id="holds_popupset">
@@ -61,8 +63,8 @@
         <menuitem command="sel_mark_items_damaged" label="&staff.circ.holds.mark_item_damaged;" accesskey="&staff.circ.holds.mark_item_damaged.accesskey;"/>
         <menuitem command="sel_mark_items_missing" label="&staff.circ.holds.mark_item_missing;" accesskey="&staff.circ.holds.mark_item_missing.accesskey;"/>
         <menuitem label="&staff.circ.holds.retarget;" command="cmd_holds_retarget" accesskey="&staff.circ.holds.retarget.accesskey;"/>
-        <menuitem label="&staff.circ.holds.cancel;" command="cmd_holds_cancel" accesskey="&staff.circ.holds.cancel.accesskey;"/>
-        <menuitem label="&staff.circ.holds.uncancel;" command="cmd_holds_uncancel" accesskey="&staff.circ.holds.uncancel.accesskey;"/>
+        <menuitem id="holds_cancel_btn" label="&staff.circ.holds.cancel;" command="cmd_holds_cancel" accesskey="&staff.circ.holds.cancel.accesskey;"/>
+        <menuitem id="holds_uncancel_btn" hidden="true" label="&staff.circ.holds.uncancel;" command="cmd_holds_uncancel" accesskey="&staff.circ.holds.uncancel.accesskey;"/>
         <menuseparator />
         <menuitem command="save_columns" label="&staff.circ.holds.save_columns;" accesskey="&staff.circ.holds.save_columns.accesskey;"/>
     </popup>
@@ -103,6 +105,10 @@
             </menupopup>
         </menulist>
         <vbox id="lib_menu_placeholder" hidden="true"/>
+        <deck id="show_cancelled_deck" hidden="true">
+            <button command="cmd_cancelled_holds_view" label="&staff.patron.holds_overlay.show_cancelled_holds.label;" accesskey="&staff.patron.holds_overlay.show_cancelled_holds.accesskey;"/>
+            <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"/>
     <spacer flex="1"/>
         <progressmeter id="progress" type="determined" hidden="true" />
@@ -131,8 +137,8 @@
                     <menuitem command="sel_mark_items_damaged" label="&staff.circ.holds.mark_item_damaged;" accesskey="&staff.circ.holds.mark_item_damaged.accesskey;"/>
                     <menuitem command="sel_mark_items_missing" label="&staff.circ.holds.mark_item_missing;" accesskey="&staff.circ.holds.mark_item_missing.accesskey;"/>
                     <menuitem label="&staff.circ.holds.retarget;" command="cmd_holds_retarget" accesskey="&staff.circ.holds.retarget.accesskey;"/>
-                    <menuitem label="&staff.circ.holds.cancel;" command="cmd_holds_cancel" accesskey="&staff.circ.holds.cancel.accesskey;"/>
-                    <menuitem label="&staff.circ.holds.uncancel;" command="cmd_holds_uncancel" accesskey="&staff.circ.holds.uncancel.accesskey;"/>
+                    <menuitem id="holds_cancel_btn2" label="&staff.circ.holds.cancel;" command="cmd_holds_cancel" accesskey="&staff.circ.holds.cancel.accesskey;"/>
+                    <menuitem id="holds_uncancel_btn2" hidden="true" label="&staff.circ.holds.uncancel;" command="cmd_holds_uncancel" accesskey="&staff.circ.holds.uncancel.accesskey;"/>
                     <menuseparator />
                     <menuitem command="save_columns" label="&staff.circ.holds.save_columns;" accesskey="&staff.circ.holds.save_columns.accesskey;"/>
                 </menupopup>



More information about the open-ils-commits mailing list