[open-ils-commits] r14625 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/server/circ 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
Tue Oct 27 03:09:53 EDT 2009
Author: phasefx
Date: 2009-10-27 03:09:48 -0400 (Tue, 27 Oct 2009)
New Revision: 14625
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/server/circ/util.js
trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
trunk/Open-ILS/xul/staff_client/server/patron/holds.js
trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
Log:
wire up Top of Queue toggle for staff client hold interface
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-10-27 06:45:58 UTC (rev 14624)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-10-27 07:09:48 UTC (rev 14625)
@@ -2048,6 +2048,8 @@
<!ENTITY staff.circ.holds.edit_hold_range.accesskey "R">
<!ENTITY staff.circ.holds.edit_hold_focus "Edit Hold Focus">
<!ENTITY staff.circ.holds.edit_hold_focus.accesskey "F">
+<!ENTITY staff.circ.holds.set_top_of_queue "Set Top of Queue">
+<!ENTITY staff.circ.holds.set_top_of_queue.accesskey "Q">
<!ENTITY staff.circ.holds.mark_item_damaged "Mark Item Damaged">
<!ENTITY staff.circ.holds.mark_item_damaged.accesskey "D">
<!ENTITY staff.circ.holds.mark_item_missing "Mark Item Missing">
Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js 2009-10-27 06:45:58 UTC (rev 14624)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js 2009-10-27 07:09:48 UTC (rev 14625)
@@ -1886,6 +1886,15 @@
},
{
'persist' : 'hidden width ordinal',
+ 'id' : 'top_of_queue',
+ 'label' : document.getElementById('commonStrings').getString('staff.ahr_top_of_queue_label'),
+ 'flex' : 1,
+ 'primary' : false,
+ 'hidden' : true,
+ 'editable' : false, 'render' : function(my) { return get_bool( my.ahr.cut_in_line() ) ? document.getElementById('commonStrings').getString('common.yes') : document.getElementById('commonStrings').getString('common.no') ; }
+ },
+ {
+ 'persist' : 'hidden width ordinal',
'id' : 'target',
'label' : document.getElementById('commonStrings').getString('staff.ahr_target_label'),
'flex' : 1,
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties 2009-10-27 06:45:58 UTC (rev 14624)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties 2009-10-27 07:09:48 UTC (rev 14625)
@@ -53,6 +53,7 @@
staff.ahr_prev_check_time_label=Previous Check Time
staff.ahr_requestor_label=Requestor
staff.ahr_selection_depth_label=Selection Depth
+staff.ahr_top_of_queue_label=Top of Queue
staff.ahr_status_label=Status
staff.ahr_target_label=Target
staff.ahr_usr_label=User
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-10-27 06:45:58 UTC (rev 14624)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-10-27 07:09:48 UTC (rev 14625)
@@ -160,6 +160,21 @@
staff.patron.holds.holds_edit_email_notify.disable_email.singular=Are you sure you would like to disable email notification for hold %1$s?
staff.patron.holds.holds_edit_email_notify.disable_email.plural=Are you sure you would like to disable email notification for hold %1$s?
staff.patron.holds.holds_edit_email_notify.mod_holds_title=Modifying Holds
+
+staff.patron.holds.holds_cut_in_line.description=Move to the front of the holds queue above other holds that are not likewise flagged Top of Queue?
+staff.patron.holds.holds_cut_in_line.btn_cut.label=Top of Queue
+staff.patron.holds.holds_cut_in_line.btn_cut.accesskey=T
+staff.patron.holds.holds_cut_in_line.btn_no_cut.label=No Top of Queue
+staff.patron.holds.holds_cut_in_line.btn_no_cut.accesskey=N
+staff.patron.holds.holds_cut_in_line.btn_cancel.label=Cancel
+staff.patron.holds.holds_cut_in_line.btn_cancel.accesskey=C
+staff.patron.holds.holds_cut_in_line.set_notifs=Set Top of Queue (Force to Front) for Holds
+staff.patron.holds.holds_cut_in_line.enable_cut.singular=Are you sure you would like to enable Top of Queue for hold %1$s?
+staff.patron.holds.holds_cut_in_line.enable_cut.plural=Are you sure you would like to enable Top of Queue for holds %1$s?
+staff.patron.holds.holds_cut_in_line.disable_cut.singular=Are you sure you would like to disable Top of Queue for hold %1$s?
+staff.patron.holds.holds_cut_in_line.disable_cut.plural=Are you sure you would like to disable Top of Queue for hold %1$s?
+staff.patron.holds.holds_cut_in_line.mod_holds_title=Modifying Holds
+
staff.patron.holds.holds_retarget.reset_hold_message.singular=Are you sure you would like to reset hold %1$s?
staff.patron.holds.holds_retarget.reset_hold_message.plural=Are you sure you would like to reset holds %1$s?
staff.patron.holds.holds_retarget.reset_hold_title=Resetting Holds
Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds.js 2009-10-27 06:45:58 UTC (rev 14624)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds.js 2009-10-27 07:09:48 UTC (rev 14625)
@@ -535,6 +535,62 @@
}
}
],
+ 'cmd_holds_cut_in_line' : [
+ ['command'],
+ function() {
+ try {
+ var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
+ xml += '<description>'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.description')+'</description>';
+ xml += '<hbox><button value="cut" label="'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.btn_cut.label')+'"';
+ xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.btn_cut.accesskey')+'" name="fancy_submit"/>';
+ xml += '<button value="nocut" label="'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.btn_no_cut.label')+'"';
+ xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.btn_no_cut.accesskey')+'" name="fancy_submit"/></hbox>';
+ xml += '</vbox>';
+ var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
+ bot_xml += '<spacer flex="1"/><button label="'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.btn_cancel.label')+'"';
+ bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
+ JSAN.use('util.window'); var win = new util.window();
+ var fancy_prompt_data = win.open(
+ urls.XUL_FANCY_PROMPT,
+ 'fancy_prompt', 'chrome,resizable,modal',
+ { 'xml' : xml, 'bottom_xml' : bot_xml, 'title' : $("patronStrings").getString('staff.patron.holds.holds_cut_in_line.set_notifs') }
+ );
+ if (fancy_prompt_data.fancy_status == 'incomplete') { return; }
+ var cut = fancy_prompt_data.fancy_submit == 'cut' ? get_db_true() : get_db_false();
+
+ var hold_list = util.functional.map_list(obj.retrieve_ids, function(o){return o.id;});
+ var msg = '';
+ if(get_bool(cut)) {
+ if(obj.retrieve_ids.length > 1) {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_cut_in_line.enable_cut.plural', [hold_list.join(', ')]);
+ } else {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_cut_in_line.enable_cut.singular', [hold_list.join(', ')]);
+ }
+ } else {
+ if(obj.retrieve_ids.length > 1) {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_cut_in_line.disable_cut.plural', [hold_list.join(', ')]);
+ } else {
+ msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_cut_in_line.disable_cut.singular', [hold_list.join(', ')]);
+ }
+ }
+
+ var r = obj.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.holds.holds_cut_in_line.mod_holds_title'),
+ $("commonStrings").getString('common.yes'),
+ $("commonStrings").getString('common.no'),
+ null,
+ $("commonStrings").getString('common.check_to_confirm')
+ );
+ if (r == 0) {
+ circ.util.batch_hold_update(hold_list, { 'cut_in_line' : cut }, { 'progressmeter' : progressmeter, 'oncomplete' : function() { obj.clear_and_retrieve(true); } });
+ }
+ } catch(E) {
+ obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.holds.holds_not_modified'),E);
+ }
+ }
+ ],
+
'cmd_holds_suspend' : [
['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-10-27 06:45:58 UTC (rev 14624)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul 2009-10-27 07:09:48 UTC (rev 14625)
@@ -27,6 +27,7 @@
<command id="cmd_holds_edit_expire_time" />
<command id="cmd_holds_activate" />
<command id="cmd_holds_suspend" />
+ <command id="cmd_holds_cut_in_line" />
<command id="cmd_holds_edit_selection_depth" />
<command id="cmd_broken" disabled="true" hidden="true"/>
<command id="cmd_holds_retarget"/>
@@ -55,6 +56,7 @@
<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;"/>
<menuitem label="&staff.circ.holds.edit_hold_focus;" class="edit_hold_focus" command="cmd_broken" accesskey="&staff.circ.holds.edit_hold_focus.accesskey;"/>
+ <menuitem label="&staff.circ.holds.set_top_of_queue;" command="cmd_holds_cut_in_line" accesskey="&staff.circ.holds.set_top_of_queue.accesskey;"/>
<menuseparator />
<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;"/>
@@ -124,6 +126,7 @@
<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;"/>
<menuitem label="&staff.circ.holds.edit_hold_focus;" class="edit_hold_focus" command="cmd_broken" accesskey="&staff.circ.holds.edit_hold_focus.accesskey;"/>
+ <menuitem label="&staff.circ.holds.set_top_of_queue;" command="cmd_holds_cut_in_line" accesskey="&staff.circ.holds.set_top_of_queue.accesskey;"/>
<menuseparator />
<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;"/>
More information about the open-ils-commits
mailing list