initial inline status text, some cleanup
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 19 Nov 2009 03:34:32 +0000 (03:34 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 19 Nov 2009 03:34:32 +0000 (03:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14965 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/css/skin/default/selfcheck.css
Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
Open-ILS/web/templates/default/circ/selfcheck/main.tt2
Open-ILS/web/templates/default/circ/selfcheck/summary.tt2

index 2df9216..e3b75ac 100644 (file)
@@ -48,7 +48,7 @@ body {
 
 .oils-selfck-item-table td {
     text-align: left;
-    padding: 10px;
+    padding: 7px;
 }
 
 .oils-selfck-item-table thead {
@@ -59,10 +59,6 @@ body {
     border-bottom: 1px solid #888;
 }
 
-.oils-selfck-item-table tbody td {
-    padding:10px;
-}
-
 
 #oils-selfck-content-div {
     width: 70%;
@@ -106,4 +102,12 @@ body {
     padding: 3px;
 }
 
+#oils-selfck-status-div {
+    height: 20px;
+    padding: 10px;
+    font-weight: bold;
+    vertical-align: middle;
+    color: red;
+}
+
 
index 64ac970..6e4a6b4 100644 (file)
@@ -207,7 +207,11 @@ SelfCheckManager.prototype.loginPatron = function(barcode, passwd) {
  */
 SelfCheckManager.prototype.updateScanBox = function(args) {
 
-    selfckScanBox.attr('value', '');
+    if(args.select) {
+        selfckScanBox.domNode.select();
+    } else {
+        selfckScanBox.attr('value', '');
+    }
 
     if(args.value)
         selfckScanBox.attr('value', args.value);
@@ -372,18 +376,23 @@ SelfCheckManager.prototype.drawHoldsPage = function() {
 
     var self = this;
     fieldmapper.standardRequest( // fetch the hold IDs
+
         ['open-ils.circ', 'open-ils.circ.holds.id_list.retrieve'],
         {   async : true,
             params : [this.authtoken, this.patron.id()],
 
             oncomplete : function(r) { 
                 var ids = openils.Util.readResponse(r);
-                if(!ids || ids.length == 0) return;
+                if(!ids || ids.length == 0) {
+                    progressDialog.hide();
+                    return;
+                }
 
                 fieldmapper.standardRequest( // fetch the hold objects with fleshed details
                     ['open-ils.circ', 'open-ils.circ.hold.details.batch.retrieve.atomic'],
                     {   async : true,
                         params : [self.authtoken, ids],
+
                         oncomplete : function(rr) {
                             self.drawHolds(openils.Util.readResponse(rr));
                         }
@@ -497,8 +506,12 @@ SelfCheckManager.prototype.checkout = function(barcode, override) {
                 break;
 
             case 'NO_SESSION':
-                // TODO logout staff
+                // TODO logout staff?
                 break;
+
+            default:
+                dojo.byId('oils-selfck-status-div').innerHTML = evt.textcode;
+                this.updateScanBox({select:true});
         }
     }
 
index 585bf89..0a9031c 100644 (file)
@@ -12,6 +12,7 @@
         <div id='oils-selfck-scan-text'></div>
         <input jsId='selfckScanBox' dojoType='dijit.form.TextBox'></input>
     </div>
+    <div id='oils-selfck-status-div'></div>
 </div>
 <div id='oils-selfck-bottom-div'>
     <div id='oils-selfck-content-div'>
index b69cf8e..ab776e6 100644 (file)
@@ -1,8 +1,8 @@
 <div id='oils-selfck-circ-info-div'>
     <div id='oils-selfck-info-nav'>
         <span><a id='oils-selfck-nav-home' href='javascript:void(0);' class='selected'>Home</a></span>
-        <span><a id='oils-selfck-nav-holds' href='javascript:void(0);'>My Holds</a></span>
-        <span><a id='oils-selfck-nav-fines' href='javascript:void(0);'>Pay Fines</a></span>
+        <span><a id='oils-selfck-nav-holds' href='javascript:void(0);'>Holds</a></span>
+        <span><a id='oils-selfck-nav-fines' href='javascript:void(0);'>Fines</a></span>
         <span><a id='oils-selfck-nav-logout' href='javascript:void(0);'>Log Out</a></span>
     </div>
     <fieldset>