[open-ils-commits] r10393 -
branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 21 10:30:25 EDT 2008
Author: erickson
Date: 2008-08-21 10:30:24 -0400 (Thu, 21 Aug 2008)
New Revision: 10393
Modified:
branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck/selfcheck.js
branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml
Log:
when a no_session event is returned, remove the cookie and reload the page. started giving the default template a little more data
Modified: branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck/selfcheck.js
===================================================================
--- branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck/selfcheck.js 2008-08-21 13:43:07 UTC (rev 10392)
+++ branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck/selfcheck.js 2008-08-21 14:30:24 UTC (rev 10393)
@@ -185,6 +185,10 @@
$('selfck-patron-login-input').select();
return;
}
+
+ if(patron.textcode == 'NO_SESSION')
+ return selfckLogoutStaff();
+
return alert(patron.textcode);
}
$('selfck-patron-login-input').value = ''; // reset the input
@@ -197,6 +201,11 @@
bcReq.send();
}
+function selfckLogoutStaff() {
+ cookieManager.remove(STAFF_SES_PARAM);
+ location.reload(true);
+}
+
/**
* If a user barcode was scanned into the item barcode
* input, log out the current user and log in the new user
@@ -270,6 +279,10 @@
} else if(evt.textcode == 'OPEN_CIRCULATION_EXISTS') {
selfckRenew();
+ } else if(evt.textcode == 'NO_SESSION') {
+
+ return selfckLogoutStaff();
+
} else {
pendingXact = false;
selfckShowMsgNode(evt);
@@ -366,6 +379,7 @@
*/
function selfckPrint() {
for(var x in successfulItems) { // make sure we've checked out at least one item
+ appendClear($('selfck-print-lib-name'), text(orgUnit.name()));
appendClear($('selfck-print-date'), text(new Date().toLocaleString()));
window.print();
return;
Modified: branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml
===================================================================
--- branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml 2008-08-21 13:43:07 UTC (rev 10392)
+++ branches/rel_1_2_3/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml 2008-08-21 14:30:24 UTC (rev 10393)
@@ -157,6 +157,14 @@
<div class='print' id='selfck-print-div'>
<div>
<div id='selfck-print-date'/>
+ <div id='selfck-print-lib-name'/>
+ <div id='selfck-print-lib-addr-street'/>
+ <div>
+ <span id='selfck-print-lib-addr-city'/>
+ <span id='selfck-print-lib-addr-state'/>
+ <span id='selfck-print-lib-addr-post-code'/>
+ </div>
+ <div><span id='selfck-print-lname'/> <span id='selfck-print-fname'/></div>
You checked out the following items:
<ol id='selfck-print-items-list'>
<li name='selfck-print-items-template'>
More information about the open-ils-commits
mailing list