[open-ils-commits] r14535 - in trunk/Open-ILS/xul/staff_client/server: circ patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Oct 21 11:55:34 EDT 2009
Author: phasefx
Date: 2009-10-21 11:55:32 -0400 (Wed, 21 Oct 2009)
New Revision: 14535
Modified:
trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js
trunk/Open-ILS/xul/staff_client/server/circ/renew.js
trunk/Open-ILS/xul/staff_client/server/circ/util.js
trunk/Open-ILS/xul/staff_client/server/patron/items.js
Log:
rework the parameters for circ.util.renew_via_barcode so that we can more easily pass in return_patron : true for the dedicated renewal interface
Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkout.js 2009-10-21 15:47:13 UTC (rev 14534)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkout.js 2009-10-21 15:55:32 UTC (rev 14535)
@@ -873,7 +873,7 @@
}
} else { // EITHER AUTO-RENEW OR OFFER CANCEL, NORMAL CHECKIN, AND RENEW
if (payload.auto_renew) {
- circ.util.renew_via_barcode( params.barcode, obj.patron_id, function(r) {
+ circ.util.renew_via_barcode( { 'barcode': params.barcode, 'patron' : obj.patron_id }, function(r) {
try {
params.renewal = true;
obj._checkout( params, r[0] );
@@ -897,7 +897,7 @@
obj.checkout(params);
break;
case 2:
- circ.util.renew_via_barcode( params.barcode, obj.patron_id, function(r) {
+ circ.util.renew_via_barcode( { 'barcode' : params.barcode, 'patron' : obj.patron_id }, function(r) {
try {
params.renewal = true;
obj._checkout( params, r[0] );
Modified: trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js 2009-10-21 15:47:13 UTC (rev 14534)
+++ trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js 2009-10-21 15:55:32 UTC (rev 14535)
@@ -268,7 +268,7 @@
var test = obj.selection_list[i].renewable;
var barcode = obj.selection_list[i].barcode;
if (test == 't') {
- circ.util.renew_via_barcode( barcode );
+ circ.util.renew_via_barcode( { 'barcode' : barcode } );
funcs.push( function(a) { return function() { obj.copy_status( a, true ); }; }(barcode) );
} else {
alert(document.getElementById('circStrings').getFormattedString('staff.circ.copy_status.sel_renew.not_circulating', [barcode]));
Modified: trunk/Open-ILS/xul/staff_client/server/circ/renew.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/renew.js 2009-10-21 15:47:13 UTC (rev 14534)
+++ trunk/Open-ILS/xul/staff_client/server/circ/renew.js 2009-10-21 15:55:32 UTC (rev 14535)
@@ -261,8 +261,7 @@
if (auto_print) auto_print = auto_print.checked;
JSAN.use('circ.util');
var renew = circ.util.renew_via_barcode(
- barcode,
- null,
+ { 'barcode' : barcode, 'return_patron' : true },
function( r ) {
obj.renew_followup( r, barcode );
}
Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js 2009-10-21 15:47:13 UTC (rev 14534)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js 2009-10-21 15:55:32 UTC (rev 14535)
@@ -2877,15 +2877,12 @@
}
};
-circ.util.renew_via_barcode = function ( barcode, patron_id, async ) {
+circ.util.renew_via_barcode = function ( params, async ) {
try {
var obj = {};
JSAN.use('util.network'); obj.network = new util.network();
JSAN.use('OpenILS.data'); obj.data = new OpenILS.data(); obj.data.stash_retrieve();
- var params = { barcode: barcode };
- if (patron_id) params.patron = patron_id;
-
function renew_callback(req) {
try {
JSAN.use('util.error'); var error = new util.error();
@@ -2938,7 +2935,7 @@
return renew;
} catch(E) {
JSAN.use('util.error'); var error = new util.error();
- error.standard_unexpected_error_alert(document.getElementById('circStrings').getFormattedString('staff.circ.checkin.renew_failed.error', [barcode]), E);
+ error.standard_unexpected_error_alert(document.getElementById('circStrings').getFormattedString('staff.circ.checkin.renew_failed.error', [params.barcode]), E);
return null;
}
}
@@ -2968,31 +2965,31 @@
7013 /* PATRON_EXCEEDS_FINES */,
],
'text' : {
- '1212' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
- '1213' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
- '1215' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
+ '1212' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
+ '1213' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
+ '1215' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
'1232' : function(r) {
- return document.getElementById('circStrings').getFormattedString('staff.circ.renew.override.item_deposit_required.warning.barcode', [barcode]);
+ return document.getElementById('circStrings').getFormattedString('staff.circ.renew.override.item_deposit_required.warning.barcode', [params.barcode]);
},
'1233' : function(r) {
- return document.getElementById('circStrings').getFormattedString('staff.circ.renew.override.item_rental_fee_required.warning.barcode', [barcode]);
+ return document.getElementById('circStrings').getFormattedString('staff.circ.renew.override.item_rental_fee_required.warning.barcode', [params.barcode]);
},
'1234' : function(r) {
return document.getElementById('circStrings').getFormattedString('staff.circ.utils.checkin.override.item_deposit_paid.warning');
},
- '7002' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
- '7003' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
+ '7002' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
+ '7003' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
'7004' : function(r) {
- return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode.status', [barcode, typeof r.payload.status() == 'object' ? r.payload.status().name() : obj.data.hash.ccs[ r.payload.status() ].name()]);
+ return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode.status', [params.barcode, typeof r.payload.status() == 'object' ? r.payload.status().name() : obj.data.hash.ccs[ r.payload.status() ].name()]);
},
- '7006' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
- '7007' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
- '7008' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
- '7009' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); },
+ '7006' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
+ '7007' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
+ '7008' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
+ '7009' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },
'7010' : function(r) {
- return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode.msg', [barcode, r.payload]);
+ return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode.msg', [params.barcode, r.payload]);
},
- '7013' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); }
+ '7013' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); }
}
}
);
@@ -3002,7 +2999,7 @@
} catch(E) {
JSAN.use('util.error'); var error = new util.error();
- error.standard_unexpected_error_alert(document.getElementById('circStrings').getFormattedString('staff.circ.checkin.renew_failed.error', [barcode]), E);
+ error.standard_unexpected_error_alert(document.getElementById('circStrings').getFormattedString('staff.circ.checkin.renew_failed.error', [params.barcode]), E);
return null;
}
};
Modified: trunk/Open-ILS/xul/staff_client/server/patron/items.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/items.js 2009-10-21 15:47:13 UTC (rev 14534)
+++ trunk/Open-ILS/xul/staff_client/server/patron/items.js 2009-10-21 15:55:32 UTC (rev 14535)
@@ -275,7 +275,7 @@
l.setAttribute('value', $("patronStrings").getFormattedString('staff.patron.items.items_renew.renewing',[bc]));
x.appendChild(l);
}
- var renew = circ.util.renew_via_barcode( bc, obj.patron_id,
+ var renew = circ.util.renew_via_barcode( { 'barcode' : bc, 'patron' : obj.patron_id },
function(r) {
try {
if ( (typeof r[0].ilsevent != 'undefined' && r[0].ilsevent == 0) ) {
More information about the open-ils-commits
mailing list