From a468fb5904276918e1c51c46482c77f2e1f83771 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 21 Aug 2008 14:30:57 +0000 Subject: [PATCH] when a no_session event is returned, remove the cookie and reload the page. started giving the default template a little more data git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@10394 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/extras/selfcheck/selfcheck.js | 14 ++++++++++++++ Open-ILS/web/opac/extras/selfcheck/selfcheck.xml | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/Open-ILS/web/opac/extras/selfcheck/selfcheck.js b/Open-ILS/web/opac/extras/selfcheck/selfcheck.js index 45ae925722..9455c05e0d 100644 --- a/Open-ILS/web/opac/extras/selfcheck/selfcheck.js +++ b/Open-ILS/web/opac/extras/selfcheck/selfcheck.js @@ -185,6 +185,10 @@ function selfckPatronLogin(barcode) { $('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 @@ function selfckPatronLogin(barcode) { 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 @@ function selfckHandleCoResult(r) { } 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 selfckRenew() { */ 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; diff --git a/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml b/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml index 9d09b354d9..b5034e4393 100644 --- a/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml +++ b/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml @@ -157,6 +157,14 @@
+
+
+
+ + + +
+
You checked out the following items:
  1. -- 2.11.0