[open-ils-commits] r18247 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 8 13:38:28 EDT 2010
Author: phasefx
Date: 2010-10-08 13:38:24 -0400 (Fri, 08 Oct 2010)
New Revision: 18247
Modified:
trunk/Open-ILS/xul/staff_client/server/circ/util.js
Log:
fix logic error where we were just testing for the presence of a user setting instead of its value
Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js 2010-10-08 17:29:52 UTC (rev 18246)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js 2010-10-08 17:38:24 UTC (rev 18247)
@@ -2517,10 +2517,16 @@
if (behind_the_desk_support) {
var usr_settings = network.simple_request('FM_AUS_RETRIEVE',[ses(),check.payload.hold.usr()]);
if (typeof usr_settings['circ.holds_behind_desk'] != 'undefined') {
- print_data.prefer_behind_holds_desk = true;
- check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.private_hold_shelf');
- print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]);
- print_data.route_to = check.route_to;
+ if (user_settings['circ.holds_behind_desk']) {
+ print_data.prefer_behind_holds_desk = true;
+ check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.private_hold_shelf');
+ print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]);
+ print_data.route_to = check.route_to;
+ } else {
+ check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf');
+ print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]);
+ print_data.route_to = check.route_to;
+ }
} else {
check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf');
print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]);
@@ -2990,10 +2996,16 @@
if (behind_the_desk_support) {
var usr_settings = network.simple_request('FM_AUS_RETRIEVE',[ses(),check.payload.hold.usr()]);
if (typeof usr_settings['circ.holds_behind_desk'] != 'undefined') {
- print_data.prefer_behind_holds_desk = true;
- destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.private_hold_shelf');
- print_data.destination_shelf_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [destination_shelf]);
- print_data.destination_shelf = destination_shelf;
+ if (usr_settings['circ.holds_behind_desk']) {
+ print_data.prefer_behind_holds_desk = true;
+ destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.private_hold_shelf');
+ print_data.destination_shelf_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [destination_shelf]);
+ print_data.destination_shelf = destination_shelf;
+ } else {
+ destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf');
+ print_data.destination_shelf_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [destination_shelf]);
+ print_data.destination_shelf = destination_shelf;
+ }
} else {
destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf');
print_data.destination_shelf_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [destination_shelf]);
More information about the open-ils-commits
mailing list