when a no_session event is returned, remove the cookie and reload the page. started...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 21 Aug 2008 14:31:01 +0000 (14:31 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 21 Aug 2008 14:31:01 +0000 (14:31 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10395 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/extras/selfcheck/selfcheck.js
Open-ILS/web/opac/extras/selfcheck/selfcheck.xml

index 45ae925..9455c05 100644 (file)
@@ -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;
index 9d09b35..b5034e4 100644 (file)
         <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'>