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

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Dec 11 15:38:37 EST 2009


Author: phasefx
Date: 2009-12-11 15:38:32 -0500 (Fri, 11 Dec 2009)
New Revision: 15148

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
   trunk/Open-ILS/xul/staff_client/server/patron/holds.js
   trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
Log:
Edit Request Date action for more hold queue juggling

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-12-11 20:35:30 UTC (rev 15147)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-12-11 20:38:32 UTC (rev 15148)
@@ -2092,6 +2092,8 @@
 <!ENTITY staff.circ.holds.set_email_notification.accesskey "E">
 <!ENTITY staff.circ.holds.edit_activation_date "Edit Activation Date">
 <!ENTITY staff.circ.holds.edit_activation_date.accesskey "D">
+<!ENTITY staff.circ.holds.edit_request_date "Edit Request Date">
+<!ENTITY staff.circ.holds.edit_request_date.accesskey "q">
 <!ENTITY staff.circ.holds.edit_expire_time "Edit Expiration Date">
 <!ENTITY staff.circ.holds.edit_expire_time.accesskey "E">
 <!ENTITY staff.circ.holds.edit_shelf_expire_time "Edit Shelf Expire Time">

Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties	2009-12-11 20:35:30 UTC (rev 15147)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties	2009-12-11 20:38:32 UTC (rev 15148)
@@ -385,6 +385,10 @@
 staff.circ.holds.activation_date.prompt.plural=Please enter an Activation Date (or leave blank to unset) for holds %1$s.  This will also Suspend the holds.
 staff.circ.holds.activation_date.too_early.error=Activation Date needs to be either unset or set to fall on a future date.
 staff.circ.holds.activation_date.invalid_date=Invalid Date
+staff.circ.holds.request_date.prompt=Please enter a new Request Date for hold %1$s.
+staff.circ.holds.request_date.prompt.plural=Please enter a new Request Date for holds %1$s.
+staff.circ.holds.request_date.dialog.description=Request Date
+staff.circ.holds.request_date.invalid_date=Invalid Date
 staff.circ.holds.expire_time.prompt=Please enter an Expiration Date (or leave blank to unset) for hold %1$s.
 staff.circ.holds.expire_time.prompt.plural=Please enter an Expiration Date (or leave blank to unset) for holds %1$s.
 staff.circ.holds.expire_time.too_early.error=Expiration Date needs to be either unset or set to fall on a future date.

Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2009-12-11 20:35:30 UTC (rev 15147)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2009-12-11 20:38:32 UTC (rev 15148)
@@ -143,6 +143,7 @@
                         obj.controller.view.cmd_holds_edit_expire_time.setAttribute('disabled','false');
                         obj.controller.view.cmd_holds_edit_shelf_expire_time.setAttribute('disabled','false');
                         obj.controller.view.cmd_holds_edit_thaw_date.setAttribute('disabled','false');
+                        obj.controller.view.cmd_holds_edit_request_date.setAttribute('disabled','false');
                         obj.controller.view.cmd_holds_activate.setAttribute('disabled','false');
                         obj.controller.view.cmd_holds_suspend.setAttribute('disabled','false');
                         obj.controller.view.cmd_alt_view.setAttribute('disabled','false');
@@ -164,6 +165,7 @@
                         obj.controller.view.cmd_holds_edit_expire_time.setAttribute('disabled','true');
                         obj.controller.view.cmd_holds_edit_shelf_expire_time.setAttribute('disabled','true');
                         obj.controller.view.cmd_holds_edit_thaw_date.setAttribute('disabled','true');
+                        obj.controller.view.cmd_holds_edit_request_date.setAttribute('disabled','true');
                         obj.controller.view.cmd_holds_activate.setAttribute('disabled','true');
                         obj.controller.view.cmd_holds_suspend.setAttribute('disabled','true');
                         obj.controller.view.cmd_alt_view.setAttribute('disabled','true');
@@ -872,7 +874,42 @@
                             }
                         }
                     ],
+                    'cmd_holds_edit_request_date' : [
+                        ['command'],
+                        function() {
+                            try {
+                                var hold_list = util.functional.map_list(obj.retrieve_ids, function(o){return o.id;});
+                                var msg_singular = document.getElementById('circStrings').getFormattedString('staff.circ.holds.request_date.prompt',[hold_list.join(', ')]);
+                                var msg_plural = document.getElementById('circStrings').getFormattedString('staff.circ.holds.request_date.prompt.plural',[hold_list.join(', ')]);
+                                var msg = obj.retrieve_ids.length > 1 ? msg_plural : msg_singular;
+                                var title = document.getElementById('circStrings').getString('staff.circ.holds.modifying_holds');
+                                var desc = document.getElementById('circStrings').getString('staff.circ.holds.request_date.dialog.description');
 
+                                JSAN.use('util.window'); var win = new util.window();
+                                var my_xulG = win.open( 
+                                    urls.XUL_TIMESTAMP_DIALOG, 'edit_request_date', 'chrome,resizable,modal', 
+                                    { 
+                                        'title' : title, 
+                                        'description' : desc, 
+                                        'msg' : msg, 
+                                        'allow_unset' : false,
+                                        'disallow_future_dates' : true,
+                                        'disallow_past_dates' : false,
+                                        'disallow_today' : false
+                                    }
+                                );
+                                if (my_xulG.complete) {
+                                    circ.util.batch_hold_update(
+                                        hold_list, 
+                                        { 'request_time' : my_xulG.timestamp }, 
+                                        { 'progressmeter' : progressmeter, 'oncomplete' :  function() { obj.clear_and_retrieve(true); } }
+                                    );
+                                }
+                            } catch(E) {
+                                obj.error.standard_unexpected_error_alert(document.getElementById('circStrings').getString('staff.circ.holds.unexpected_error.not_likely_modified'),E);
+                            }
+                        }
+                    ],
                     'cmd_holds_retarget' : [
                         ['command'],
                         function() {

Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul	2009-12-11 20:35:30 UTC (rev 15147)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul	2009-12-11 20:38:32 UTC (rev 15148)
@@ -25,6 +25,7 @@
         <command id="cmd_holds_edit_phone_notify" />
         <command id="cmd_holds_edit_email_notify" />
         <command id="cmd_holds_edit_thaw_date" />
+        <command id="cmd_holds_edit_request_date" />
         <command id="cmd_holds_edit_expire_time" />
         <command id="cmd_holds_edit_shelf_expire_time" />
         <command id="cmd_holds_activate" />
@@ -58,6 +59,7 @@
             <menuitem label="&staff.circ.holds.edit_expire_time;" command="cmd_holds_edit_expire_time" accesskey="&staff.circ.holds.edit_expire_time.accesskey;"/>
             <menuitem label="&staff.circ.holds.edit_shelf_expire_time;" command="cmd_holds_edit_shelf_expire_time" accesskey="&staff.circ.holds.edit_shelf_expire_time.accesskey;"/>
             <menuitem label="&staff.circ.holds.edit_activation_date;" command="cmd_holds_edit_thaw_date" accesskey="&staff.circ.holds.edit_activation_date.accesskey;"/>
+            <menuitem label="&staff.circ.holds.edit_request_date;" command="cmd_holds_edit_request_date" accesskey="&staff.circ.holds.edit_request_date.accesskey;"/>
             <menuitem label="&staff.circ.holds.activate_hold;" command="cmd_holds_activate" accesskey="&staff.circ.holds.activate_hold.accesskey;"/>
             <menuitem label="&staff.circ.holds.suspend_hold;" command="cmd_holds_suspend" accesskey="&staff.circ.holds.suspend_hold.accesskey;"/>
             <menuitem label="&staff.circ.holds.edit_hold_range;" class="edit_hold_range" command="cmd_holds_edit_selection_depth" accesskey="&staff.circ.holds.edit_hold_range.accesskey;"/>
@@ -134,6 +136,7 @@
                     <menuitem label="&staff.circ.holds.edit_expire_time;" command="cmd_holds_edit_expire_time" accesskey="&staff.circ.holds.edit_expire_time.accesskey;"/>
                     <menuitem label="&staff.circ.holds.edit_shelf_expire_time;" command="cmd_holds_edit_shelf_expire_time" accesskey="&staff.circ.holds.edit_shelf_expire_time.accesskey;"/>
                     <menuitem label="&staff.circ.holds.edit_activation_date;" command="cmd_holds_edit_thaw_date" accesskey="&staff.circ.holds.edit_activation_date.accesskey;"/>
+                    <menuitem label="&staff.circ.holds.edit_request_date;" command="cmd_holds_edit_request_date" accesskey="&staff.circ.holds.edit_request_date.accesskey;"/>
                     <menuitem label="&staff.circ.holds.activate_hold;" command="cmd_holds_activate" accesskey="&staff.circ.holds.activate_hold.accesskey;"/>
                     <menuitem label="&staff.circ.holds.suspend_hold;" command="cmd_holds_suspend" accesskey="&staff.circ.holds.suspend_hold.accesskey;"/>
                     <menuitem label="&staff.circ.holds.edit_hold_range;" class="edit_hold_range" command="cmd_holds_edit_selection_depth" accesskey="&staff.circ.holds.edit_hold_range.accesskey;"/>



More information about the open-ils-commits mailing list