[open-ils-commits] r10293 -
branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 7 09:28:38 EDT 2008
Author: erickson
Date: 2008-08-07 09:28:32 -0400 (Thu, 07 Aug 2008)
New Revision: 10293
Modified:
branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js
Log:
pull org location from URL param "l" .. default to org tree root
Modified: branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js 2008-08-07 13:26:27 UTC (rev 10292)
+++ branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js 2008-08-07 13:28:32 UTC (rev 10293)
@@ -33,6 +33,7 @@
var scanTimeout = 800;
var scanTimeoutId;
var patronBarcodeRegex;
+var orgUnit;
function selfckInit() {
@@ -41,13 +42,12 @@
selfckSetupPrinter();
- /*
- XXX we need org information (from the proxy?)
- var t = fetchOrgSettingDefault(1, 'circ.selfcheck.patron_login_timeout');
+ orgUnit = findOrgUnitSN(cgi.param('l')) || globalOrgTree;
+
+ var t = fetchOrgSettingDefault(orgUnit.id(), 'circ.selfcheck.patron_login_timeout');
patronTimeout = (t) ? parseInt(t) * 1000 : patronTimeout;
- */
- var reg = fetchOrgSettingDefault(globalOrgTree.id(), 'opac.barcode_regex');
+ var reg = fetchOrgSettingDefault(orgUnit.id(), 'opac.barcode_regex');
if(reg) patronBarcodeRegex = new RegExp(reg);
if(!staff) {
More information about the open-ils-commits
mailing list