PINES Custom Self-Check for 3.10 Upgrade#
authorChris Sharp <csharp@georgialibraries.org>
Wed, 1 Apr 2015 17:16:03 +0000 (13:16 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 23 Nov 2022 18:56:53 +0000 (13:56 -0500)
branding the built-in selfcheck interface for PINES

These are modifications to the Evergreen self-check interface to:

1. Fix bugs with printing holds and fines.
2. Improve page layout overall, and with consideration for
   1024x768 resolution monitors that a lot of libraries use.
3. Hide hold status from view on holds table.
4. Hide buttons/fields from screen when user is not logged in.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Conflicts:
Open-ILS/src/templates/circ/selfcheck/banner.tt2

Additional changes to the self-check interface.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Selfcheck Cookie Path

Change base.xul/base.js to support a "cookie path" option to limit what paths
will use the login cookie, then tell the selfcheck interface to use it.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Self-Check changes in preparation for upgrade:
Changed wording on some of the on-screen directions.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Restoring selfcheck.js to stock version

PINES Customization: Self-check text changes

Modified login text to make it more user friendly.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
PINES Customization: Self-check - add note about online catalog

Added note to screen referring people to online catalog if they
wish to perform functions not available in self-check such as
paying fines and handling renewals.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
PINES fix for self-check missing code

This adds back code that is in master and was in rel_3_6_1, but was
missing in rel_3_8_0.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
PINES Customization to Self-check Wording

Signed-off-by: McCanna <tmccanna@georgialibraries.org>
LP#1810296: Fix selfcheck patron password setting check

Previously, the selfcheck ignored this setting if it was
set to "False", since the setting value is stored as text
and the truth test always succeeded.  Instead, explicitly
check that the setting is "True".

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Customization of self-check interface so that username, password,
and barcode text banners appear in different colors in an effort
to make it clearer to patrons that they are being asked for a
different type of information.

Note that that this also tweaks the password check because the old
format was different from current master and no longer working correctly.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
PINES Self-check Customization

New PINES logo and matching color scheme

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
PINES Customization for Self-Check: Hide Pay Fines Button

There are some environments where the Pay Fines button was
appearing even though it is supposed to be hidden via CSS.

This adds more CSS to move the button off the side of the page.
(Removing the button entirely broke the interface.)

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates/base.tt2
Open-ILS/src/templates/circ/selfcheck/banner.tt2
Open-ILS/src/templates/circ/selfcheck/fines.tt2
Open-ILS/src/templates/circ/selfcheck/holds_page.tt2
Open-ILS/src/templates/circ/selfcheck/main.tt2
Open-ILS/src/templates/circ/selfcheck/summary.tt2
Open-ILS/web/css/skin/default/selfcheck.css
Open-ILS/web/images/pines_logo_selfcheck.png [new file with mode: 0644]
Open-ILS/web/js/dojo/openils/circ/nls/selfcheck.js
Open-ILS/web/js/ui/base.js
Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js

index d85240c..ba577d1 100644 (file)
@@ -9,7 +9,7 @@
         <script type="text/javascript">var djConfig = {parseOnLoad:true,isDebug:false};</script>
         <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/opensrf/md5.js"></script>
-        <script type="text/javascript">var oilsBasePath = [% IF ctx.base_path.substr(0,1) == '/' %]location.href.replace(RegExp(location.pathname + '.*'),'') +[% END %] '[% ctx.base_path %]'</script>
+        <script type="text/javascript">var oilsBasePath = [% IF ctx.base_path.substr(0,1) == '/' %]location.href.replace(RegExp(location.pathname + '.*'),'') +[% END %] '[% ctx.base_path %]'; var oilsCookiePath = '[% ctx.oilsCookiePath or '/' %]';</script>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/base.js"></script>
         <script type="text/javascript">
             dojo.require("dijit.layout.LayoutContainer");
index baf12e4..700190a 100644 (file)
@@ -1,15 +1,13 @@
-<div id='oils-selfck-user-banner'></div>
 <div id='oils-selfck-logo-div'>
-    <img src='[% ctx.media_prefix %]/images/self_eg_logo.png'/>
+    <img src='[% ctx.media_prefix %]/images/pines_logo_selfcheck.png' style="height:100px;"/><br/>
+       <p style="color:#fff;font-weight:normal;font-size:1.1em;margin-top:5px;padding:0px;">
+       Use this self-check station to check out your items.</p>
 </div>
-<br/>
-<br/>
+<div id='oils-selfck-user-banner'></div>
+
 <div id='oils-selfck-scan-div'>
     <div id='oils-selfck-scan-text'></div>
-    <br/>
-    <input jsId='selfckScanBox' dojoType='dijit.form.TextBox'/>
-    <br/>
-    <br/>
+    <input jsId='selfckScanBox' dojoType='dijit.form.TextBox' style="padding:2px;margin:5px;" />
 </div>
 <div id='oils-selfck-status-div'></div>
 
index eb49730..6d8e373 100644 (file)
@@ -1,5 +1,5 @@
 <span id='oils-selfck-selected-total'></span>
-<span style='padding-left:5px;'><a class='hidden' href='javascript:void(0);' id='oils-selfck-pay-fines-link'><button class="self-button" type="button">[% l('Pay Fines') %]</button></a></span>
+<span style='padding-left:5px;margin-left:-500px;'><a class='hidden' href='javascript:void(0);' id='oils-selfck-pay-fines-link'><button class="self-button" type="button">[% l('Pay Fines') %]</button></a></span>
 <div id='oils-selfck-fines-table-div'>
     <table id='oils-selfck-fines-table' class='oils-selfck-item-table'>
         <thead>
index 601c45d..c049f18 100644 (file)
@@ -5,7 +5,7 @@
                 <td id='oils-self-hold-pic-cell'></td>
                 <td>[% l('Title') %]</td>
                 <td>[% l('Author') %]</td>
-                <td>[% l('Status') %]</td>
+                <td class="hidden">[% l('Status') %]</td>
             </tr>
         </thead>
         <tbody id='oils-selfck-hold-tbody'>
@@ -13,7 +13,7 @@
                 <td><img class='oils-selfck-jacket' name='jacket'/></td>
                 <td name='title'></td>
                 <td name='author'></td>
-                <td name='status'></td>
+                <td name='status' class="hidden"></td>
             </tr>
         </tbody>
     </table>
index aa3c2eb..0222e5f 100644 (file)
@@ -1,18 +1,17 @@
-[% ctx.page_title = l('Self Checkout') %]
+[% ctx.page_title = l('Self Checkout'); ctx.oilsCookiePath = '/eg/circ/selfcheck/' %]
 [% WRAPPER base.tt2 %]
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/circ/selfcheck/selfcheck.js'> </script>
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/circ/selfcheck/payment.js"></script>
 <link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/selfcheck.css'/>
 [% INCLUDE 'circ/selfcheck/audio_config.tt2' %]
 [% INCLUDE 'circ/selfcheck/logout_dialog.tt2' %]
-
 <div id='oils-selfck-top-div'>
     [% INCLUDE 'circ/selfcheck/banner.tt2' %]
 </div>
 <div id='oils-selfck-bottom-div' class="hidden">
     <div id='oils-selfck-content-div'>
         <div id='oils-selfck-content-header'>
-            <span><a id='oils-selfck-print-list-link' href='javascript:void(0);' class="hidden"><button type="button" class="self-button">[% l('Print List') %]</button></a></span>
+            <span><a id='oils-selfck-print-list-link' href='javascript:void(0);'><button type="button" class="self-button">[% l('Print This List') %]</button></a></span>
         </div>
         <div id='oils-selfck-circ-page' class='hidden'>
             <!-- Checkout / renewal and items out interface -->
index 7b1487c..d7072b7 100644 (file)
             <span><a href='javascript:void(0);' id='oils-selfck-view-fines-link'><button type="button" class="self-button">[% l('View Details') %]</button></a></span>
         </div>
     </fieldset>
+    <!-- PINES Customization -->
+    <fieldset>
+        <legend>[% l('My Account') %]</legend>
+        <div>Log in to the online catalog (gapines.org) to renew items, manage holds, or pay fines. 
+        <i>(Online fine payment not offered by all libraries.)</i></div>
+    </fieldset>
 </div>
 
index 37b8dff..851b5a0 100644 (file)
@@ -5,16 +5,16 @@ body {
 }
 
 #oils-selfck-top-div {
-    background: #00593d; /* Old browsers */
+    background: #006838; /* Old browsers */
 /* IE9 SVG, needs conditional override of 'filter' to 'none' */
     background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwNTkzZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDdhNTQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
-    background: -moz-linear-gradient(top,  #00593d 0%, #007a54 100%); /* FF3.6+ */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00593d), color-stop(100%,#007a54)); /* Chrome,Safari4+ */
-    background: -webkit-linear-gradient(top,  #00593d 0%,#007a54 100%); /* Chrome10+,Safari5.1+ */
-    background: -o-linear-gradient(top,  #00593d 0%,#007a54 100%); /* Opera 11.10+ */
-    background: -ms-linear-gradient(top,  #00593d 0%,#007a54 100%); /* IE10+ */
-    background: linear-gradient(to bottom,  #00593d 0%,#007a54 100%); /* W3C */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00593d', endColorstr='#007a54',GradientType=0 ); /* IE6-8 */
+    background: -moz-linear-gradient(top,  #006838 0%, #8DC641 100%); /* FF3.6+ */
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#006838), color-stop(100%,#8DC641)); /* Chrome,Safari4+ */
+    background: -webkit-linear-gradient(top,  #006838 0%,#8DC641 100%); /* Chrome10+,Safari5.1+ */
+    background: -o-linear-gradient(top,  #006838 0%,#8DC641 100%); /* Opera 11.10+ */
+    background: -ms-linear-gradient(top,  #006838 0%,#8DC641 100%); /* IE10+ */
+    background: linear-gradient(to bottom,  #006838 0%,#8DC641 100%); /* W3C */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#006838', endColorstr='#006838',GradientType=0 ); /* IE6-8 */
     padding-top: 20px;
     /*margin: 2px;*/
     /*border: 1px solid #888;*/
@@ -23,18 +23,20 @@ body {
 }
 
 #oils-selfck-user-banner {
-    position:fixed;
-    top:30px;
-    /*right:30px;*/
     color: white;
+       font-weight:bold;
+       font-size:1.2em;
+       padding:0px;
+       margin:0px 0px 10px 0px;
 }
 
 #oils-selfck-logo-div {
-    /*margin: 20px;*/
+    /*margin: 10px;*/
 }
 
 #oils-selfck-scan-text {
-    font-size: 16px;
+    font-size: 1.2em;
+       font-weight:normal;
     background: none repeat scroll 0 0 #252525;
     color: white;
     padding: 10px;
@@ -90,14 +92,14 @@ body {
 #oils-selfck-content-header {
     text-align: right;
     width: 100%;
-    margin-top: 18px;
+    margin-top: 2px;
 }
 #oils-selfck-content-header span {
     padding-left: 5px;
 }
 
 #oils-selfck-info-nav {
-    margin: 15px 10px 15px 10px;
+    margin: 0px 10px 10px 10px;
     padding: 8px;
 }
 
@@ -143,8 +145,7 @@ body {
 
 #oils-selfck-status-div {
     background: white;
-    height: 20px;
-    padding-top: 10px;
+    height: 10px;
     font-weight: bold;
     vertical-align: middle;
     color: red;
@@ -167,15 +168,16 @@ body {
     text-shadow: 1px 1px 1px #555555;
     cursor: pointer !important;
     border-radius: 12px;
-    border: 1px solid #007a54;
-    background: linear-gradient(#007a54, #00593d);
-    background: -moz-linear-gradient(#007a54, #00593d);
-    background: -o-linear-gradient(#007a54, #00593d);
-    background: -webkit-linear-gradient(#007a54, #00593d);
+    border: 1px solid #006838;
+    background: linear-gradient(#006838, #00593d);
+    background: -moz-linear-gradient(#006838, #00593d);
+    background: -o-linear-gradient(#006838, #00593d);
+    background: -webkit-linear-gradient(#006838, #00593d);
     background-color: #00593d;
     padding: 5px 10px 6px;
     outline: 0 none;
     text-decoration: none;
+       margin: 3px;
 }
 
 A {
diff --git a/Open-ILS/web/images/pines_logo_selfcheck.png b/Open-ILS/web/images/pines_logo_selfcheck.png
new file mode 100644 (file)
index 0000000..4dfce5e
Binary files /dev/null and b/Open-ILS/web/images/pines_logo_selfcheck.png differ
index 438d556..63214c0 100644 (file)
@@ -1,9 +1,9 @@
 {
-    "TOTAL_ITEMS_SESSION" : "Total items this session: ${0}.",
-    "TOTAL_ITEMS_ACCOUNT" : "Total items on account:  ${0}.",
+    "TOTAL_ITEMS_SESSION" : "Total items this session: ${0}",
+    "TOTAL_ITEMS_ACCOUNT" : "Total items on account:  ${0}",
     "HOLDS_READY_FOR_PICKUP" : "You have ${0} item(s) ready for pickup.",
     "TOTAL_HOLDS" : "You have ${0} total holds.",
-    "TOTAL_FINES_ACCOUNT" : "Total fines on account: $${0}.",
+    "TOTAL_FINES_ACCOUNT" : "Total fines on account: $${0}",
     "HOLD_STATUS_READY" : "Ready for pickup",
     "HOLD_STATUS_WAITING" : "#${0} in line with ${1} copies",
     "CHECKOUT_SUCCESS" : "Checkout of item ${0} succeeded",
@@ -11,7 +11,7 @@
     "ALREADY_OUT" : "Item ${0} is already checked out",
     "OPEN_CIRCULATION_EXISTS" : "Item ${0} is already checked out to another user",
     "GENERIC_CIRC_FAILURE" : "Unable to check out item ${0}.  Please see staff.",
-    "LOGIN_FAILED" : "Login for ${0} failed",
+    "LOGIN_FAILED" : "Login for ${0} failed. Please see staff for assistance.",
     "UNKNOWN_ERROR" : "An unhandled exception occurred with error code ${0}",
     "MAX_RENEWALS" : "No more renewals allowed for item ${0}",
     "ITEM_NOT_CATALOGED" : "Item ${0} was not found in the system.  Try re-scanning the item.",
     "WORKSTATION_EXISTS" : "This workstation has already been registered.  Would you like to use it for this self-check station?",
     "CC_PAYABLE_BALANCE" : "Total amount to pay: $${0}",
     "TOTAL_FINES_SELECTED" : "Selected total: $${0}",
-    "WELCOME_BANNER" : "Welcome, ${0}",
-    "ENTER_PASSWORD" : "Please enter your password",
-    "PLEASE_LOGIN" : "Please log in with your username or library barcode.",
-    "ENTER_BARCODE" : "Please enter an item barcode",
+    "WELCOME_BANNER" : "Welcome, ${0}!",
+    "ENTER_PASSWORD" : "<b>PASSWORD:</b> Type in your password, then press Enter.",
+    "PLEASE_LOGIN" : "<b>LOG IN:</b> Scan your library card or type in your user name (and press Enter).",
+    "ENTER_BARCODE" : "<b>SCAN ITEM:</b> Scan a barcode.",
     "MISCELLANEOUS" : "Miscellaneous",
     "FAIL_PART_actor_usr_barred": "The patron is barred",
     "FAIL_PART_asset_copy_circulate": "The item does not circulate",
index c6ed445..aefd735 100644 (file)
@@ -47,7 +47,7 @@ function oilsSetupUser() {
 
         if(!authtoken) {
 
-            dojo.cookie('ses', null, {expires:-1, path:'/'}); // remove the cookie
+            dojo.cookie('ses', null, {expires:-1, path:oilsCookiePath}); // remove the cookie
 
             dojo.addOnLoad(function(){
                 if(openils.XUL.isXUL()) {
@@ -67,7 +67,7 @@ function oilsSetupUser() {
         }
     }
 
-    dojo.cookie('ses', authtoken, {path:'/', 'secure' : true});
+    dojo.cookie('ses', authtoken, {path:oilsCookiePath, 'secure' : true});
     openils.User.authtoken = authtoken;
     openils.User.workstation = workstation;
     return authtoken;
@@ -115,7 +115,7 @@ function oilsDoLogin() {
         args.workstation = workstation;
 
     if(user.login(args)) {
-        dojo.cookie('ses', user.authtoken, {path : '/'});
+        dojo.cookie('ses', user.authtoken, {path : oilsCookiePath});
         location.href = location.href;
     } else {
         openils.Util.show('oils-login-failed');
index 32f6664..e465806 100644 (file)
@@ -333,10 +333,10 @@ SelfCheckManager.prototype.loadOrgSettings = function() {
 
     if(settings[SET_BARCODE_REGEX]) {
         this.patronBarcodeRegex = new RegExp(settings[SET_BARCODE_REGEX].value);
-    } else {
-        this.patronBarcodeRegex = new RegExp(/^\d/); 
-        // this assumes barcodes start with digits
-    }
+       } else {
+               this.patronBarcodeRegex = new RegExp(/^\d/);
+               // this assumes barcodes start with digits
+       }
 
     // Subtract the timeout warning interval from the configured timeout 
     // so that when taken together they add up to the configured amount.
@@ -372,6 +372,8 @@ SelfCheckManager.prototype.drawLoginPage = function() {
         msg : localeStrings.PLEASE_LOGIN,
         handler : bcHandler
     });
+    /* PINES Customization: Change color of text instructions in banner for user name. */
+    dojo.style('oils-selfck-scan-text','background-color','#000');
 }
 
 /**
@@ -529,8 +531,12 @@ SelfCheckManager.prototype.updateScanBox = function(args) {
 
     if(args.password) {
         selfckScanBox.domNode.setAttribute('type', 'password');
+        /* PINES Customization: Change color of text instructions in banner for password. */
+        dojo.style('oils-selfck-scan-text','background-color','crimson');
     } else {
         selfckScanBox.domNode.setAttribute('type', '');
+        /* PINES Customization: Change color of text instructions in banner for barcodes. */
+        dojo.style('oils-selfck-scan-text','background-color','#E67E22');
     }
 
     if(args.value)