Refactor SCKO interface with bootstrap styling and scaffolding.
Separate different portions of the interface out into their own
files for readability.
Refactor sidebar into bottom button bar.
Remove pay fines front-end functionality.
Remove unnecessary images.
Replace images with newer, updated ones.
Cleanup selfcheck.js.
Add thank-you page with a 5-second timeout.
Create scrollable tables in data itnerfaces.
Convert tabs to spaces.
Display message when there are no available holds.
Center and style "Staff Login Required" text.
Prevent Double-scan of Checkout barcodes.
Doesn't show transactions in the fines list that have a negative balance.
Doesn't show total balance owed.
Separate Theme-based css information into selfcheck-default.css.
Add High contrast theme css file.
Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Signed-off-by: Victoria Lewis <vlewis@catalyte.io>
Changes to be committed:
modified: KCLS/openils/var/templates_kcls/circ/selfcheck/banner.tt2
modified: KCLS/openils/var/templates_kcls/circ/selfcheck/circ_page.tt2
modified: KCLS/openils/var/templates_kcls/circ/selfcheck/fines.tt2
new file: KCLS/openils/var/templates_kcls/circ/selfcheck/footer.tt2
modified: KCLS/openils/var/templates_kcls/circ/selfcheck/holds_page.tt2
modified: KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2
modified: KCLS/openils/var/templates_kcls/circ/selfcheck/patron_login.tt2
modified: KCLS/openils/var/templates_kcls/circ/selfcheck/summary.tt2
modified: Open-ILS/src/templates/base.tt2
new file: Open-ILS/web/css/skin/kcls/selfcheck-default.css
new file: Open-ILS/web/css/skin/kcls/selfcheck-high-contrast.css
modified: Open-ILS/web/css/skin/kcls/selfcheck.css
deleted: Open-ILS/web/images/selfcheck/arrow.gif
new file: Open-ILS/web/images/selfcheck/arrow.png
new file: Open-ILS/web/images/selfcheck/kcls-logo.png
new file: Open-ILS/web/images/selfcheck/libcard.jpg
modified: Open-ILS/web/images/selfcheck/libcard_barcode.jpg
modified: Open-ILS/web/js/dojo/openils/circ/nls/selfcheck.js
modified: Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js
-<div id='oils-selfck-user-banner'></div>
-<div id='oils-selfck-logo-div'>
- <img src='[% ctx.media_prefix %]/images/eg_logo.jpg'/>
-</div>
-<div id='oils-selfck-scan-div'>
- <div id='oils-selfck-scan-text'></div>
- <input jsId='selfckScanBox' dojoType='dijit.form.TextBox'/>
-</div>
-<div id='oils-selfck-status-div'></div>
-
+<nav class="navbar navbar-default navbar-static-top navbar-scko" style="background:#D2232A" id="header">
+ <div class="navbar-header">
+ <a class="navbar-brand"><img src="[% ctx.media_prefix %]/images/selfcheck/kcls-logo.png" alt="kcls logo" class="scko-logo" /></a>
+ </div>
+ <div class="navbar-scko-container">
+ <span class="navbar-text-scko">CHECK OUT HERE</span>
+ </div>
+</nav>
\ No newline at end of file
-<div id='oils-selfck-circ-table-div'>
- <table id='oils-selfck-circ-table' class='oils-selfck-item-table'>
- <thead>
- <tr>
- <td id='oils-self-circ-pic-cell'></td>
- <td>Barcode</td>
- <td>Title</td>
- <td>Author</td>
- <td>Due Date</td>
- <td class='hidden'>Renewals Left</td>
- <td>Type</td>
- </tr>
- </thead>
- <tbody id='oils-selfck-circ-tbody'>
- <tr id='oils-selfck-circ-row'>
- <td><img class='oils-selfck-jacket' name='jacket'/></td>
- <td name='barcode'></td>
- <td name='title'></td>
- <td name='author'></td>
- <td name='due_date'></td>
- <td class='hidden' name='remaining'></td>
- <td>
- <div name='checkout' class='hidden'>Checkout</div>
- <div name='renew' class='hidden'>Renewal</div>
- </td>
- </tr>
- </tbody>
- <tbody id='oils-selfck-circ-out-tbody' class='oils-selfck-item-table'></tbody>
+<div class="row">
+ <div class="col-md-offset-4 col-xs-9 col-md-8"><label>Items Checked Out</label></div>
+ <div class="col-xs-3 pad-vert-btn">
+ <a href="javascript:;" onclick="selfCheckMgr.printList('items_out');" class="btn btn-success scko-action-btn">
+ Print List</a>
+ </div>
+</div>
+
+<div class="scko-table">
+<div class="row">
+ <div class="col-xs-12">
+ <table class="table scko-table-striped">
+ <tbody id='oils-selfck-circ-out-tbody'>
+ <tr id='oils-selfck-circ-out-row'><td>
+ <table>
+ <tr><td class="scko-table-label">BARCODE:</td><td name="barcode"></td></tr>
+ <tr><td class="scko-table-label">TITLE:</td><td name="title"></td></tr>
+ <tr><td class="scko-table-label">AUTHOR:</td><td name="author"></td></tr>
+ <tr><td class="scko-table-label">DUE DATE:</td><td name="due_date"></td></tr>
+ <tr><td class="scko-table-label hideMe">FORMAT:</td><td class="hideMe" name="format"></td></tr>
+ </table>
+ </td></tr>
+ </tbody>
</table>
+ </div>
</div>
+</div>
\ No newline at end of file
-<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'>Pay Fines</a></span>
-<div id='oils-selfck-fines-table-div'>
- <table id='oils-selfck-fines-table' class='oils-selfck-item-table'>
- <thead>
- <tr>
- <td><input type='checkbox' checked='checked' id='oils-selfck-fines-selector'/></td>
- <td>Type</td>
- <td>Details</td>
- <td>Total Billed</td>
- <td>Total Paid</td>
- <td>Balance Owed</td>
- </tr>
- </thead>
- <tbody id='oils-selfck-fines-tbody'>
- <tr id='oils-selfck-fines-row'>
- <td><input type='checkbox' name='selector' checked='checked'/></td>
- <td name='type'></td>
- <td name='details'></td>
- <td name='total_owed'></td>
- <td name='total_paid'></td>
- <td name='balance' style='color:red;'></td>
- </tr>
- </tbody>
+<div class="row">
+ <div class="col-md-offset-5 col-xs-9 col-md-7"><label>Fines</label></div>
+ <div class="col-xs-3 pad-vert-btn">
+ <a href="javascript:;" onclick="selfCheckMgr.printList('fines')" class="btn btn-success scko-action-btn">
+ Print List
+ </a>
+ </div>
+</div>
+
+<div class="scko-table">
+<div class="row ">
+ <div class="col-xs-12">
+ <table class="table scko-table-striped">
+ <tbody id='oils-selfck-fines-tbody'>
+ <tr id='oils-selfck-fines-row'><td>
+ <table>
+ <tr><td class="scko-table-label">TITLE:</td><td name="title"></td></tr>
+ <tr class="dueDate"><td class="scko-table-label">DUE DATE:</td><td name="due_date"></td></tr>
+ <tr class="dateReturn"><td class="scko-table-label">DATE RETURN:</td><td name="date_return"></td></tr>
+ <tr><td class="scko-table-label">BALANCE OWED:</td><td style="color:red;">$<span name="balance"></span></td></tr>
+ </table>
+ </td></tr>
+ </tbody>
</table>
+ </div>
</div>
+</div>
\ No newline at end of file
--- /dev/null
+<footer class="scko-footer">
+ <div class="row">
+ <div class="col-xs-12 col-sm-3">
+ <span id="sidebar_step3d">
+ <a href="javascript:;" class="btn btn-primary scko-footer-btn"
+ id='oils-selfck-items-out-renew-details-link'>Renew Items</a>
+ </span>
+ </div>
+ <div class="col-xs-12 col-sm-3">
+ <span id="sidebar_step3d2">
+ <a href="javascript:;" class="btn btn-primary scko-footer-btn"
+ id='oils-selfck-items-out-details-link'>Your Check-outs</a>
+ </span>
+ </div>
+ <div class="col-xs-12 col-sm-3">
+ <span id="sidebar_step3e">
+ <a href="javascript:;" class="btn btn-primary scko-footer-btn"
+ id='oils-selfck-hold-details-link'>
+ <div style="display:inline-block;">
+ Your Holds<br/>
+ <span id="oils-selfck-holds-total">0 Holds</span><br/>
+ <span id="oils-selfck-holds-ready">0</span> Ready for Pickup
+ </div>
+ </a>
+ </span>
+ </div>
+ <div class="col-xs-12 col-sm-3">
+ <span id="sidebar_step3c">
+ <a href="javascript:;" class="btn btn-primary scko-footer-btn"
+ id='oils-selfck-view-fines-link'>Fees</a>
+ </span>
+ </div>
+ </div>
+</footer>
\ No newline at end of file
-<div id='oils-selfck-hold-table-div'>
- <table id='oils-selfck-hold-table' class='oils-selfck-item-table'>
- <thead>
- <tr>
- <td id='oils-self-hold-pic-cell'></td>
- <td>Title</td>
- <td>Author</td>
- <td>Status</td>
- </tr>
- </thead>
- <tbody id='oils-selfck-hold-tbody'>
- <tr id='oils-selfck-hold-row'>
- <td><img class='oils-selfck-jacket' name='jacket'/></td>
- <td name='title'></td>
- <td name='author'></td>
- <td name='status'></td>
- </tr>
- </tbody>
+<div class="row">
+ <div class="col-md-offset-5 col-xs-9 col-md-7"><label>Your Holds</label></div>
+</div>
+<div class="row">
+ <div class="col-md-offset-1 col-md-5 pad-vert-btn">
+ <a href="javascript:;" onclick="selfCheckMgr.printList('ready')" class="btn btn-success scko-action-btn">Print Ready for Pickup</a>
+ </div>
+ <div class="col-xs-3 col-md-offset-1 col-md-5 pad-vert-btn">
+ <a href="javascript:;" onclick="selfCheckMgr.printList('holds')" class="btn btn-success scko-action-btn">
+ Print Holds</a>
+ </div>
+</div>
+<div class="scko-table">
+<div class="row">
+ <div class="col-md-12 text-center"><label class="scko-table-ready">Items Ready for Pick-Up</label></div>
+</div>
+<div class="row">
+ <div class="col-xs-12">
+ <table class="table scko-table-striped">
+ <tbody id='oils-selfck-rdy-tbody'>
+ <tr id='oils-selfck-noready'><td>
+ <table>
+ <tr><td>There are currently no holds ready for pickup.</tr></td>
+ </table>
+ </td></tr>
+ <tr id='oils-selfck-rdy-row'><td>
+ <table>
+ <tr><td class="scko-table-label scko-table-ready">TITLE:</td><td name="title" class="scko-table-ready"></td></tr>
+ <tr><td class="scko-table-label scko-table-ready">AUTHOR:</td><td name="author" class="scko-table-ready"></td></tr>
+ <tr><td class="scko-table-label scko-table-ready">STATUS:</td><td name="status" class="scko-table-ready"></td></tr>
+ </table>
+ </td></tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+<div class="row">
+ <div class="col-md-12 text-center"><label class="scko-table-holds">Holds</label></div>
+</div>
+<div class="row">
+ <div class="col-xs-12">
+ <table class="table scko-table-striped">
+ <tbody id='oils-selfck-hold-tbody'>
+ <tr id='oils-selfck-hold-row'><td>
+ <table>
+ <tr><td class="scko-table-label scko-table-holds">TITLE:</td><td name="title" class="scko-table-holds"></td></tr>
+ <tr><td class="scko-table-label scko-table-holds">AUTHOR:</td><td name="author" class="scko-table-holds"></td></tr>
+ <tr><td class="scko-table-label scko-table-holds">STATUS:</td><td name="status" class="scko-table-holds"></td></tr>
+ </table>
+ </td></tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+<div class="row">
+ <div class="col-md-12 text-center"><label class="scko-table-holds scko-table-suspended">Suspended</label></div>
+</div>
+<div class="row">
+ <div class="col-xs-12">
+ <table class="table scko-table-striped">
+ <tbody id='oils-selfck-suspended-tbody'>
+ <tr id='oils-selfck-suspended-row'><td>
+ <table>
+ <tr><td class="scko-table-label scko-table-suspended">TITLE:</td><td name="title" class="scko-table-suspended"></td></tr>
+ <tr><td class="scko-table-label scko-table-suspended">AUTHOR:</td><td name="author" class="scko-table-suspended"></td></tr>
+ <tr><td class="scko-table-label scko-table-suspended">STATUS:</td><td name="status" class="scko-table-suspended"></td></tr>
+ </table>
+ </td></tr>
+ </tbody>
</table>
+ </div>
</div>
+
+</div>
\ No newline at end of file
[% WRAPPER base.tt2 %]
<!-- ***************************************** main.tt2 ***************************************************** -->
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" href="[% ctx.media_prefix %]/js/ui/default/staff/build/css/bootstrap.min.css" />
+<link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/kcls/selfcheck.css'/>
+<link rel='stylesheet' id="style" type='text/css' href='[% ctx.media_prefix %]/css/skin/kcls/selfcheck-default.css' title="default">
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/jquery.min.js"></script>
-<div id="selfcheck-main">
<script type="text/javascript">
function switchTo(str,subpage) {
- selfckResetTimer(); // reset login timer
- var pages = [];
- var sidebarLinks = [];
- pages['step0'] = document.getElementById('step0');
- pages['step1'] = document.getElementById('step1');
- pages['step2'] = document.getElementById('step2');
- pages['step3'] = document.getElementById('step3');
- pages['step3a'] = document.getElementById('step3a');
- //pages['step3b'] = document.getElementById('step3b');
- pages['step3c'] = document.getElementById('step3c');
- pages['step3d'] = document.getElementById('step3d');
- pages['step3e'] = document.getElementById('step3e');
- pages['step3f'] = document.getElementById('step3f');
- pages['step4'] = document.getElementById('step4');
- pages['step5'] = document.getElementById('step5');
- pages['pay_fines'] = document.getElementById('pay_fines');
-
- sidebarLinks['sidebar_step3c'] = document.getElementById('sidebar_step3c');
- sidebarLinks['sidebar_step3d'] = document.getElementById('sidebar_step3d');
- sidebarLinks['sidebar_step3e'] = document.getElementById('sidebar_step3e');
- sidebarLinks['sidebar_step3f'] = document.getElementById('sidebar_step3f');
+ selfckResetTimer(); // reset login timer
+ var pages = [];
+ var sidebarLinks = [];
+ pages['step0'] = document.getElementById('step0');
+ pages['step1'] = document.getElementById('step1');
+ pages['step2'] = document.getElementById('step2');
+ pages['step3'] = document.getElementById('step3');
+ pages['step3a'] = document.getElementById('step3a');
+ //pages['step3b'] = document.getElementById('step3b');
+ pages['step3c'] = document.getElementById('step3c');
+ pages['step3d'] = document.getElementById('step3d');
+ pages['step3e'] = document.getElementById('step3e');
+ pages['step3d2'] = document.getElementById('step3d2');
+ pages['step4'] = document.getElementById('step4');
- for(var i in pages) { if(!pages[i]) continue; pages[i].style.display="none"; }
- for(var i in sidebarLinks) { if(!sidebarLinks[i]) continue; sidebarLinks[i].className=""; }
-
- if(subpage) {
- pages[subpage].style.display="block";
- sidebarLinks['sidebar_'+subpage].className="selected";
- }
- pages[str].style.display="block";
- if(str=='step3' && !subpage) pages['step3a'].style.display="block";
- try{dojo.byId('selfckScanBox').focus();dojo.byId('selfckScanBox').select();}catch(e){}
-}
-</script>
+ sidebarLinks['sidebar_step3c'] = document.getElementById('sidebar_step3c');
+ sidebarLinks['sidebar_step3d'] = document.getElementById('sidebar_step3d');
+ sidebarLinks['sidebar_step3d'] = document.getElementById('sidebar_step3d2');
+ sidebarLinks['sidebar_step3e'] = document.getElementById('sidebar_step3e');
+ for(var i in pages) { if(!pages[i]) continue; pages[i].style.display="none"; }
+ for(var i in sidebarLinks) { if(!sidebarLinks[i]) continue; sidebarLinks[i].className=""; }
+ if(subpage) {
+ pages[subpage].style.display="block";
+ sidebarLinks['sidebar_'+subpage].className="selected";
+ }
+ pages[str].style.display="block";
+ if(str=='step3' && !subpage) pages['step3a'].style.display="block";
+ try{dojo.byId('selfckScanBox').focus();dojo.byId('selfckScanBox').select();}catch(e){}
+}
+</script>
+<div id="selfcheck-main" class="container-background">
+[% INCLUDE "circ/selfcheck/banner.tt2" %]
<div dojoType='openils.widget.ProgressDialog' jsId='progressDialog'></div>
-<div dojoType="dijit.Dialog" jsId='oilsSelfckWsDialog' class='oils-login-dialog' style='display:none;'>
- <form>
- <table>
- <tr>
- <td>Choose a location</td>
- <td><div dojoType='openils.widget.OrgUnitFilteringSelect' jsId='oilsSelfckWsLocSelector'
- searchAttr='shortname' labelAttr='shortname'/></td>
- </tr>
- <tr>
- <td>Enter a workstation name</td>
- <td><input dojoType='dijit.form.TextBox' jsId='oilsSelfckWsName'/></td>
- </tr>
- <tr>
- <td colspan='2' align='center'>
- <button jsId='oilsSelfckWsSubmit' dojoType='dijit.form.Button'>Submit</button>
- </td>
- </tr>
- </table>
- </form>
-</div>
+<div class="container">
+ <div class="row">
+ <div class="col-md-6">
+ <div dojoType="dijit.Dialog" jsId='oilsSelfckWsDialog' class='oils-login-dialog' style='display:none;'>
+ <form>
+ <div class="form-group">
+ <label class="col-md-4 control-label" for="oilsSelfckWsLocSelector">[% l('Choose a Location') %]</label>
+ <div class="col-md-8">
+ <div dojoType='openils.widget.OrgUnitFilteringSelect' jsId='oilsSelfckWsLocSelector'
+ searchAttr='shortname' labelAttr='shortname' id='oilsSelfckWsLocSelector'/>
+ </div>
+ </div>
-<div style="height:66px;background:#ae2c2a;"><div id='header'>
- <a href='javascript:;'><img src='[% ctx.media_prefix %]/images/selfcheck/KCLS_logo_horiz.gif' alt='kcls logo' /></a>
- <span style="font-size:36px;color:white;position:relative;top:-10px;left:15px;">CHECK OUT HERE</span>
-</div></div>
+ <div class="form-group">
+ <label class="col-md-4 control-label" for="oilsSelfckWsName">[% l('Enter a workstation name') %]</label>
+ <div class="col-md-8">
+ <input dojoType='dijit.form.TextBox' jsId='oilsSelfckWsName'/>
+ </div>
+ </div>
-<div id='content-wrapper'>
- <div id='main-content'>
- <div style='clear:both;'></div>
-
+ <div class="form-group">
+ <div class="col-md-offset-4 col-md-2">
+ <button jsId='oilsSelfckWsSubmit' dojoType='dijit.form.Button'>Submit</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div></div>
-<script src='[% ctx.media_prefix %]/js/ui/kcls/circ/selfcheck/selfcheck.js'> </script>
+<script src='[% ctx.media_prefix %]/js/ui/kcls/circ/selfcheck/selfcheck.js'></script>
<script src="[% ctx.media_prefix %]/js/ui/kcls/circ/selfcheck/payment.js"></script>
-<link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/kcls/selfcheck.css'/>
[% INCLUDE 'circ/selfcheck/audio_config.tt2' %]
[% INCLUDE 'circ/selfcheck/logout_dialog.tt2' %]
-
- <div id="step0" class="checkout" style="width=100%;text-align:center;">Staff login required</div>
- <div id="step1" class="checkout hidden" style="padding-top:15px;">
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr>
- <td align="center"><h1>Scan your library card barcode<br />OR type your library card number</h1></td></tr></table>
- <table cellpadding="0" cellspacing="0" border="0" style="margin:20px auto;"><tr>
- <td><img src="[% ctx.media_prefix %]/images/selfcheck/libcard_barcode.jpg" alt='library card' /></td><td style="padding-left:10px;"><span style="font-size:18px;">Example 0017620030</span><br /><input type="text" id='patron-login-username' />
- <div style="position:absolute;"><div style="position:relative;top:-70px;"><div id='oils-selfck-status-div2' class='status_box'></div></div></div></td>
- <td><a href="javascript:;" onclick="checkLogin();" style="position:relative;top:12px;left:5px;"><img alt='go' src="[% ctx.media_prefix %]/images/selfcheck/gobutton.jpg" /></a></td></tr></table>
+ <div id="content-wrapper" class="container container-background">
+ <div id="step0" class="checkout status_box text-center scko-container pad-vert">
+ <div class="row pad-vert">
+ <div class="col-md-12">
+ <h1 class="text-danger">Staff login required.</h1>
+ </div>
+ </div>
</div>
- <div id="step2" class="checkout hidden" style="padding-top:15px;">
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr>
- <td align="center"><h1>Enter your PIN or password</h1></td></tr></table>
- <table cellpadding="0" cellspacing="0" border="0" style="margin:20px auto;"><tr>
- <td style="padding-left:10px;"><span style="font-size:18px;">Example 0926</span><br /><input type="password" id='patron-login-password' />
- <div style="position:absolute;"><div style="position:relative;top:10px;"><div id='oils-selfck-status-div3' class='status_box'></div><div class="hidden" id="back_to_login"><a href="javascript:;" onclick="cancelLogin();">Cancel</a></div></div></div></td>
- <td><a href="javascript:;" onclick="selfCheckMgr.loginPatron(dojo.byId('patron-login-username').value,dojo.byId('patron-login-password').value);" style="position:relative;top:12px;left:5px;"><img alt='go' src="[% ctx.media_prefix %]/images/selfcheck/gobutton.jpg" /></a></td></tr></table>
+ <div id="step1" class="checkout scko-container hideMe">
+ [% INCLUDE 'circ/selfcheck/patron_login.tt2' %]
</div>
- <div id="step3" class="checkout" style="display:none;">
- <table cellpadding="0" cellspacing="0" border="0" width="694" height="410" style="margin-bottom:2px;">
- <tr><td valign="top" width="444" style="padding:3px;" rowspan="2">
- <img src="[% ctx.media_prefix %]/images/selfcheck/barcodedetailbook.jpg" alt='item barcode' style="float:left;" />
- <div class="header1">
- <h2>Scan your library item to begin checkout</h2>
- <input type="text" jsId='selfckScanBox' class="userid" id="selfckScanBox" dojoType='dijit.form.TextBox' />
+ <div id="step3" class="checkout scko-container" style="display:none;">
+ <div class="container scko-container">
+ <div class="row">
+ <div class="col-xs-3 pad-vert">
+ <img src="[% ctx.media_prefix %]/images/selfcheck/barcodedetailbook.jpg" alt='item barcode'/>
</div>
- <br />
-
- <div id="step3a" style="">
- <table cellpadding="0" cellspacing="0" border="0" width="100%" height="70"><tr><td width="100%"><div id='oils-selfck-status-div' class="oils-selfck-status-div"></div></td></tr></table>
- <div id='oils-selfck-scan-text' class='hidden'></div>
- <br /><br />
- <table cellpadding="5" cellspacing="0" border="0" class="item_table" width="100%">
- <tbody id='oils-selfck-circ-tbody'>
- <tr id='oils-selfck-circ-row'><td>
- <table cellpadding="2" cellspacing="0" border="0">
- <tr><td class="label">BARCODE:</td><td name="barcode"></td></tr>
- <tr><td class="label">TITLE:</td><td name="title"></td></tr>
- <tr><td class="label" nowrap="nowrap">DUE DATE:</td><td name="due_date"></td></tr>
- <tr><td></td><td><div class="hidden"><div name='checkout' class='hidden'>Checkout</div><div name='renew' class='hidden'>Renewal</div></div></td></tr>
- </table>
- </td></tr>
- </tbody>
- </table>
- </div>
-
- <div id="step3c" style="display:none;">
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" style="font-weight:bold;font-size:20px;">Fines</td></tr></table>
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><a href="javascript:;" onclick="selfCheckMgr.printList('fines')"><img src="[% ctx.media_prefix %]/images/selfcheck/printlist.jpg" alt='print' /></a></td><td class="hidden"><a class="hidden" href="javascript:;" id="oils-selfck-pay-fines-link">Pay Fines</a></td></tr></table><br />
- <table cellpadding="5" cellspacing="0" border="0" class="item_table" width="100%">
- <tbody id='oils-selfck-fines-tbody'>
- <tr id='oils-selfck-fines-row'><td width="443">
- <table cellpadding="2" cellspacing="0" border="0" width="100%">
- <tr><td class="label"><input style="float:left;margin:2px;" class="hidden" type="checkbox" checked="checked" name='selector' onclick='selfckResetTimer();' title='pay this fine' /> TITLE:</td><td name="title"></td></tr>
- <tr><td class="label">DUE DATE:</td><td name="due_date"></td></tr>
- <tr><td class="label">DATE RETURN:</td><td name="date_return"></td></tr>
- <tr><td class="label">BALANCE OWED:</td><td style="color:red;">$<span name="balance"></span></td></tr>
- </table>
- </td></tr>
- </tbody>
- </table>
-<div id="pay_fines" class="hidden">
-[% INCLUDE 'circ/selfcheck/payment.tt2' %]
-</div>
+ <div class="col-xs-12 col-sm-9 col-md-6">
+ <div class="pad-vert greet"><span id="user_name"></span></div>
+ <div class="row header1">
+ <div class="col-xs-12">
+ <label for="selfckScanBox">Scan your library item to begin check-out</label>
+ <input type="text" jsId='selfckScanBox' class="form-control" id="selfckScanBox" dojoType='dijit.form.TextBox' />
+ </div>
+ </div>
</div>
-
- <div id="step3d" style="display:none;">
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" style="font-weight:bold;font-size:20px;">Items Checked Out</td></tr></table><br />
- <a href="javascript:;" onclick="selfCheckMgr.printList('items_out');"><img src="[% ctx.media_prefix %]/images/selfcheck/printlist.jpg" alt='print' /></a><br /><br />
- <table cellpadding="5" cellspacing="0" border="0" class="item_table" width="100%">
- <tbody id='oils-selfck-circ-out-tbody'>
- <tr id='oils-selfck-circ-out-row'><td>
- <table cellpadding="2" cellspacing="0" border="0">
- <tr><td class="label">BARCODE:</td><td name="barcode"></td></tr>
- <tr><td class="label">TITLE:</td><td name="title"></td></tr>
- <tr><td class="label">AUTHOR:</td><td name="author"></td></tr>
- <tr><td class="label">DUE DATE:</td><td name="due_date"></td></tr>
- <tr><td class="label hidden">FORMAT:</td><td class="hidden" name="format"></td></tr>
- </table>
- </td></tr>
- </tbody>
- </table>
+ </div>
+ <!--div class="row">
+ <div class="col-md-offset-3 col-xs-12 col-md-6">
+ <div class="row">
+ <div class="col-md-offset-5 col-xs-9 col-md-7"><label>Heading</label></div>
+ </div>
+ <div class="row">
+ <div class="col-md-5 pad-vert-btn">
+ <a href="javascript:;" class="btn btn-success scko-action-btn">Print Ready for Pickup</a>
+ </div>
+ <div class="col-xs-3 col-md-5 pad-vert-btn">
+ <a href="javascript:;" onclick="selfCheckMgr.printList('holds')" class="btn btn-success scko-action-btn">
+ Print List</a>
+ </div>
+ </div>
</div>
- <div id="step3f" style="display:none;">
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" style="font-weight:bold;font-size:20px;">Items Ready for Pick-Up</td></tr></table><br />
- <a href="javascript:;"onclick="selfCheckMgr.printList('rdyHolds')"><img src="[% ctx.media_prefix %]/images/selfcheck/printlist.jpg" alt='print' /></a><br /><br />
- <table cellpadding="5" cellspacing="0" border="0" class="item_table" width="100%">
- <tbody id='oils-selfck-rdy-tbody'>
- <tr id='oils-selfck-rdy-row'><td>
- <table cellpadding="2" cellspacing="0" border="0">
- <tr><td class="label">TITLE:</td><td name="title"></td></tr>
- <tr><td class="label hidden">FORMAT:</td><td name="format" class="hidden"></td></tr>
- <tr><td class="label">PICKUP LOCATION:</td><td name="lib"></td></tr>
- <tr><td class="label">PICK UP BY:</td><td name="date"></td></tr>
- </table>
- </td></tr>
- </tbody>
- </table>
- <br /br>
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" style="font-weight:bold;font-size:20px;">Holds</td></tr></table><br />
- <a href="javascript:;" onclick="selfCheckMgr.printList('holds')"><img alt='print' src="[% ctx.media_prefix %]/images/selfcheck/printlist.jpg" /></a><br /><br />
- <table cellpadding="5" cellspacing="0" border="0" class="item_table" width="100%">
- <tbody id='oils-selfck-hold-tbody'>
- <tr id='oils-selfck-hold-row'><td>
- <table cellpadding="2" cellspacing="0" border="0">
- <tr><td class="label">TITLE:</td><td name="title"></td></tr>
- <tr><td class="label">AUTHOR:</td><td name="author"></td></tr>
- <tr><td class="label hidden">FORMAT:</td><td class="hidden" name="format"></td></tr>
- <tr><td class="label">STATUS:</td><td name="status"></td></tr>
- </table>
- </td></tr>
- </tbody>
- </table>
- <br /br>
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" style="font-weight:bold;font-size:20px;" class="suspHold">Suspended</td></tr></table><br />
- <table cellpadding="5" cellspacing="0" border="0" class="item_table" width="100%">
- <tbody id='oils-selfck-susp-tbody' class="suspHold">
- <tr id='oils-selfck-susp-row'><td>
- <table cellpadding="2" cellspacing="0" border="0" >
- <tr><td class="label">TITLE:</td><td name="title"></td></tr>
- <tr><td class="label">AUTHOR:</td><td name="author"></td></tr>
- <tr><td class="label hidden">FORMAT:</td><td class="hidden" name="format"></td></tr>
- <tr><td class="label">STATUS:</td><td name="status"></td></tr>
- </table>
- </td></tr>
- </tbody>
- </table>
- </div>
- </td>
- <td class="sidebar" valign="top" width="226">
- <div id="floatdiv" style="position:relative; width:226px; height:375px;left:0px;top:0px;z-index:100;">
- <h3 class="top" id="todays_date"></h3>
- <div class="greet">Hello, <span id="user_name"></span>.</div>
- <h3>Your Account</h3>
- <p id="sidebar_step3c" style="display:none;">Fines: <span id="acct_fines"></span><br /><a href="javascript:;" id='oils-selfck-view-fines-link'>View Details</a></p>
- <p id="sidebar_step3d">(<span id="oils-selfck-circ-account-total">0) Items</span> Checked Out<br /><a href="javascript:;" id='oils-selfck-items-out-details-link'>View Details</a></p>
- <p id="sidebar_step3f">(<span id="oils-selfck-holds-total">0) Items</span> on Hold<br /><a href="javascript:;" id='oils-selfck-hold-details-link'>View Details</a></p>
+ </div-->
+ <div class="row scko-height">
+ <div class="col-md-offset-3 col-xs-12 col-md-6 scko-height">
+ <div id="step3a" class="scko-height">
+ [% INCLUDE 'circ/selfcheck/summary.tt2' %]
+ </div>
- <div style="padding-left:40px;padding-top:10px;">
- <div style="padding-bottom:5px;"><a href="javascript:;" id='oils-selfck-nav-logout-print'><img alt='logout with receipt' src="[% ctx.media_prefix %]/images/selfcheck/logoutbutton.jpg" style="" /></a></div>
- <div style=""><a href="javascript:;" id='oils-selfck-nav-logout'><img alt='logout without receipt' src="[% ctx.media_prefix %]/images/selfcheck/logoutwithoutreceiptbutton.jpg" style="" /></a></div>
- </div>
- <div class="col-md-12 pad-vert-btn">
- <button id='oils-selfck-nav-logout-email' class='hidden' alt='logout and email receipt' style=""
- class="btn btn-danger">Finish & Email Receipt</button>
+ <div id="step3c" style="display:none;" class="scko-height">
+ [% INCLUDE 'circ/selfcheck/fines.tt2' %]
+ </div>
+
+ <div id="step3d" style="display:none;" class="scko-height">
+ [% INCLUDE 'circ/selfcheck/circ_page.tt2' %]
+ </div>
+
+ <div id="step3e" style="display:none;" class="scko-height">
+ [% INCLUDE 'circ/selfcheck/holds_page.tt2' %]
+ </div>
</div>
- <div style="clear:both;padding-top:15px;padding-left:3px;">
- <a href="javascript:;" id="back_button" onclick="switchTo('step3');"><img alt='back to checkout' src="[% ctx.media_prefix %]/images/selfcheck/arrow.gif" /></a> <a href="javascript:;" onclick="switchTo('step3');"><span style="position:relative;top:-4px;left:2px;">Back to Checkout</span></a>
+ <div class="col-md-3 col-xs-12">
+ <div class="row">
+ <div class="col-md-12">
+ </div>
+
+ <div class="col-md-12 pad-vert-btn">
+ <a href="javascript:; id="back_button"" onclick="switchTo('step3');" class="btn btn-primary">
+ <img alt='back to checkout' class="scko-btn-to-checkout" src="[% ctx.media_prefix %]/images/selfcheck/arrow.png"/>
+ <span>Back to Check-out</span></a>
+ </div>
+
+ <div class="col-md-12 pad-vert-btn">
+ <button id='oils-selfck-nav-logout-print' alt='logout and print receipt' style=""
+ class="btn btn-danger">Finish & Print Receipt</button>
+ </div>
+ <div class="col-md-12 pad-vert-btn">
+ <button id='oils-selfck-nav-logout-email' alt='logout and email receipt' style=""
+ class="btn btn-danger">Finish & Email Receipt</button>
+ </div>
+ <div class="col-md-12 pad-vert-btn">
+ <button id='oils-selfck-nav-logout' alt='logout without receipt' style=""
+ class="btn btn-danger">Finish No Receipt</button>
+ </div>
+ <script src="[% ctx.media_prefix %]/js/ui/kcls/circ/selfcheck/floating.js"></script>
+ </div>
</div>
- </div>
-<script src="[% ctx.media_prefix %]/js/ui/kcls/circ/selfcheck/floating.js"></script>
- </td></tr>
- </table>
- </div>
-
- <div id="step4" class="checkout" style="padding-top:15px;display:none;">
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center"><h1>Checkout Complete.<br />Please take your reciept.</h1></td></tr></table>
- </div>
-
- <div id="step5" class="checkout" style="padding-top:15px;display:none;">
- <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center"><h1>Checkout Complete.</h1></td></tr></table>
+ </div>
+ </div>
+ <div id="oils-selfck-footer-buttons">
+ [% INCLUDE "circ/selfcheck/footer.tt2" %]
+ </div>
</div>
-
-
- <div style='clear:both;'></div>
- </div>
-</div>
+
+ <div id="step4" class="checkout scko-container text-center" style="display:none;">
+ <div class="row pad-vert">
+ <div class="col-md-12">
+ <h1>YOU ARE LOGGED OUT.</h1>
+ </div>
+ </div>
+ <div class="row pad-vert">
+ <div class="col-md-12">
+ <h2>Thank you for using Self check-out.</h2>
+ </div>
+ </div>
+ <div class="row pad-vert">
+ <div class="col-md-12">
+ <button id='oils-selfck-nav-return-login' alt='Return to Login'
+ class="btn btn-info">Return to Login</button>
+ </div>
+ </div>
+ </div></div>
+ <div class="clearfix" />
</div>
<!-- ***************************************** END: main.tt2 ***************************************************** -->
-[% END %]
+[% END %]
\ No newline at end of file
-<div>Please login using your library barcode</div>
-<div class='oils-selfck-login-box'>
- <input jsId='selfckBarcodeBox' dojoType='dijit.form.TextBox'></input>
+<div class="container scko-container">
+<div class="row">
+ <div class="col-md-12">
+ <h2>1) Scan your library card barcode OR type your library card number or username<br />2) Type your PIN</h2>
+ </div>
</div>
-<div id='oils-selfck-login-pw' class='hidden oils-selfck-login-box'>
- <input jsId='selfckPwBox' dojoType='dijit.form.TextBox'></input>
+<div class="row pad-vert">
+ <div class="col-md-4">
+ <img src="[% ctx.media_prefix %]/images/selfcheck/libcard_barcode.jpg" alt='library card barcode' class="scko-image" />
+ </div>
+ <div class="col-md-8">
+ <div class="row">
+ <div class="col-md-8">
+ <div class="form-group">
+ <div id='oils-selfck-status-div2' class='status_box'></div>
+ <label class="control-label" for="patron-login-username">Example 0017620030</label>
+ <input type="text" id='patron-login-username' class="form-control" placeholder="Enter your library card number here"/>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-10">
+ <label class="control-label" for="patron-login-password">Example 0926</label>
+ <div class="row">
+ <div class="col-md-7">
+ <div class="form-group">
+ <input type="password" id='patron-login-password' class="form-control" placeholder="Enter your PIN here"/>
+ </div>
+ </div>
+ <div class="col-xs-6 col-md-3">
+ <div class="form-group">
+ <button class="btn btn-success" if="patron-login-submit" onfocus="checkLogin();
+ selfCheckMgr.loginPatron(dojo.byId('patron-login-username').value,dojo.byId('patron-login-password').value);">
+ GO >>>
+ </button>
+ </div>
+ </div>
+ <div class="col-md-offset-3 col-xs-6">
+ <button class="btn btn-default btn-high-contrast"
+ onclick="swapStyleSheet('[% ctx.media_prefix %]/css/skin/kcls/selfcheck-high-contrast.css',
+ '[% ctx.media_prefix %]/css/skin/kcls/selfcheck-default.css');">Toggle High Contrast Option</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
+</div>
\ No newline at end of file
-<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-logout-print' href='javascript:void(0);'>Logout</a></span>
- <span><a id='oils-selfck-nav-logout' href='javascript:void(0);'>Logout (No Receipt)</a></span>
- </div>
- <fieldset>
- <legend>Items Checked Out</legend>
- <div id='oils-selfck-circ-session-total'></div>
- <div id='oils-selfck-circ-account-total'></div>
- <div><a href='javascript:void(0);' id='oils-selfck-items-out-details-link'>View Items Out</a></div>
- </fieldset>
- <fieldset>
- <legend>Holds</legend>
- <div id='oils-selfck-holds-ready'></div>
- <div id='oils-selfck-holds-total'></div>
- <div><a href='javascript:void(0);' id='oils-selfck-hold-details-link'>View Holds</a></div>
- </fieldset>
- <fieldset>
- <legend>Fines</legend>
- <div id='oils-selfck-fines-total'></div>
- <div>
- <span><a href='javascript:void(0);' id='oils-selfck-view-fines-link'>View Details</a></span>
- </div>
- </fieldset>
-</div>
+<!-- Will need js edit to safely remove or hide -->
+<div id='oils-selfck-status-div' class="oils-selfck-status-div status_box"></div>
+<div id='oils-selfck-scan-text' class='hidden alert alert-warning'></div>
+<div class="scko-table">
+<div class="row">
+ <div class="col-xs-12">
+ <table class="table scko-table-striped">
+ <tbody id='oils-selfck-circ-tbody'>
+ <tr id='oils-selfck-circ-row'><td>
+ <table>
+ <tr><td class="scko-table-label" style="color:black">BARCODE:</td><td name="barcode"></td></tr>
+ <tr><td class="scko-table-label" style="color:black">TITLE:</td><td name="title"></td></tr>
+ <tr><td class="scko-table-label" style="color:black" nowrap="nowrap">DUE DATE:</td><td name="due_date"></td>
+ <td><div class="hideMe">
+ <div name='checkout' class='hidden'>Check out</div>
+ <div name='renew' class='hidden'>Renewal</div>
+ </div></td></tr>
+ <tr><td></tr></td>
+ </td></tr>
+ </table>
+ </td></tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+</div>
\ No newline at end of file
<head>
<title>[% ctx.page_title %]</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+ <link rel="stylesheet" type='text/css' href="[% ctx.media_prefix %]/css/bootstrap.min.css" />
<link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %].css' />
<link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/theme/[% ctx.skin %].css' />
<script language='javascript' src='/IDL2js' type='text/javascript'></script>
<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/dojo/dojo.js"></script>
<script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/dojo/openils_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>
--- /dev/null
+/*
+ Basic Colors for Self-checkout interface
+ */
+html, body {
+ font-size: 18px;
+}
+a {
+ color: #003399;
+}
+
+label {
+ font-size:16px;
+}
+
+h1 {
+ font-size: 22px;
+}
+
+h2 {
+ font-size: 20px;
+}
+
+#header {
+ color: #bda964;
+}
+
+#main-content-scko h1 {
+ font-size: 20px;
+}
+
+#main-content-scko h1 {
+ font-size: 16px;
+}
+
+#main-content-scko li {
+ margin-top: 12px;
+}
+
+.navbar-scko {
+ background:#D2232A
+}
+
+.navbar-text-scko {
+ color:white;
+ font-size:25px;
+}
+
+.scko-container {
+ color: #585d5e;
+ font-size: 13px;
+ background-color: #FFF;
+}
+
+.scko-table-suspended {
+ color:#A8A8A8;
+}
+
+.btn-high-contrast {
+ color: #FFF;
+ background-color: #353535;
+ border-color: #ccc
+}
+
+.container-background {
+ background: #353535;
+}
+
+.checkout .header1 {
+ border-bottom:1px solid #a83135;
+}
+
+.checkout .userid {
+ border:2px solid black !important;
+}
+
+.checkout {
+ font-size:14px;
+}
+
+.checkout h1 {
+ font-size:20px;
+}
+
+.checkout h2 {
+ font-size:16px;
+}
+
+.checkout .userid {
+ font-size:18px;
+}
+
+.checkout .item_table td {
+ font-size:18px;
+ border:2px solid black;
+}
+
+.scko-table-striped>tbody>tr:nth-of-type(odd) {
+ background-color: #f3f3f3
+}
+
+.checkout .status_box {
+ color:red;
+}
+
+.checkout .oils-selfck-status-div {
+ color: blue;
+}
+
+.checkout_failure {
+ color: red !important;
+}
+@media screen and (min-width:768px) {
+ .scko-footer-btn {
+ background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #008ec2), color-stop(1, #023a4f));
+ background:-moz-linear-gradient(top, #008ec2 5%, #023a4f 100%);
+ background:-webkit-linear-gradient(top, #008ec2 5%, #023a4f 100%);
+ background:-o-linear-gradient(top, #008ec2 5%, #023a4f 100%);
+ background:-ms-linear-gradient(top, #008ec2 5%, #023a4f 100%);
+ background:linear-gradient(to bottom, #008ec2 5%, #023a4f 100%);
+ font-size:18px;
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#008ec2', endColorstr='#023a4f',GradientType=0);
+ background-color:#02729E;
+ color:#ffffff;
+ text-shadow:0px 1px 5px #000000;
+ }
+
+ .scko-footer-btn:hover {
+ background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #023a4f), color-stop(1, #008ec2));
+ background:-moz-linear-gradient(top, #023a4f 5%, #008ec2 100%);
+ background:-webkit-linear-gradient(top, #023a4f 5%, #008ec2 100%);
+ background:-o-linear-gradient(top, #023a4f 5%, #008ec2 100%);
+ background:-ms-linear-gradient(top, #023a4f 5%, #008ec2 100%);
+ background:linear-gradient(to bottom, #023a4f 5%, #008ec2 100%);
+ background-color:#02729E;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ Basic Colors for Self-checkout interface
+ */
+html, body {
+ font-weight: 800;
+ font-size: 20px;
+}
+
+a {
+ color: #003399;
+}
+
+h1 {
+ font-size: 24px;
+}
+
+h2 {
+ font-size: 22px;
+}
+
+input::-webkit-input-placeholder {
+ color: #000000 !important;
+ opacity: 0.8;
+}
+
+input::-moz-placeholder {
+ color: #000000 !important;
+ opacity: 0.8;
+}
+
+label {
+ font-size:18px;
+}
+
+.table {
+ border-top: 2px solid #ffffff;
+ border-bottom: 2px solid #ffffff;
+ color:#ffffff;
+}
+.sidebar {
+ padding: 5px 0;
+ background-color:#FFFFFF;
+}
+
+.form-control {
+ color: #000000;
+ border: 2px solid #f2f227;
+ font-weight:800;
+}
+#user_name {
+ font-weight:800;
+}
+#header {
+ color: #00FFF5;
+}
+
+#main-content-scko h1 {
+ font-size: 22px;
+}
+
+#main-content-scko h1 {
+ font-size: 18px;
+}
+
+#main-content-scko li {
+ margin-top: 14px;
+}
+
+.navbar-text-scko {
+ font-size:27px;
+}
+
+label {
+ color: #ffffff;
+}
+
+.dijitTextBox {
+ background-color: #ffffff !important;
+ background: #ffffff !important;
+ color:#000000;
+ font-weight:800;
+ border: 2px solid #f2f227 !important;
+}
+.dijitButtonNode {
+ color:#ffffff;
+ background:#246100 !important;
+}
+.dijitHover .dijitButtonNode {
+ color:#246100 !important;
+ background: #ffffff !important;
+}
+
+.dijitDialogTitleBar {
+ background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #353535), color-stop(1, #000000)) !important;
+ background:-moz-linear-gradient(top, #353535 5%, #000000 100%) !important;
+ background:-webkit-linear-gradient(top, #353535 5%, #000000 100%) !important;
+ background:-o-linear-gradient(top, #353535 5%, #000000 100%) !important;
+ background:-ms-linear-gradient(top, #353535 5%, #000000 100%) !important;
+ background:linear-gradient(to bottom, #353535 5%, #000000 100%) !important;
+ border-top:3px solid #ffffff !important;
+ border-left:3px solid #ffffff !important;
+ border-right:3px solid #ffffff !important;
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#353535', endColorstr='#000000',GradientType=0) !important;
+}
+.dijitDialogPaneContent {
+ background:#000000 !important;
+ border-bottom:3px solid #ffffff !important;
+ border-left:3px solid #ffffff !important;
+ border-right:3px solid #ffffff !important;
+ color:#ffffff !important;
+}
+.dijitButton {
+ color:#000000 !important;
+ background-color:#246100 !important;
+ border:3px solid #ffffff !important;
+}
+
+.navbar-scko {
+ background:#FF000A
+}
+
+.navbar-text-scko {
+ color:#ffffff;
+}
+
+.scko-container {
+ color: #ffffff;
+ font-size: 15px;
+ background-color: #000000;
+}
+
+.btn-success {
+ background-color:#246100;
+ color: #ffffff;
+}
+.btn-success:hover {
+ background-color:#ffffff;
+ color:#246100;
+ border:3px solid #246100 !important;
+}
+.btn-high-contrast {
+ color: #ffffff;
+ background-color: #000000;
+ border:3px solid #ffffff;
+ border-radius: 0;
+}
+
+.btn-primary {
+ color: #ffffff;
+}
+.btn-primary:hover {
+ background-color:#ffffff;
+ color:#008ec2;
+ border:3px solid #008ec2 !important;
+}
+.btn-danger {
+ background-color:#a62924;
+ color: #ffffff;
+}
+.btn-danger:hover {
+ background-color:#ffffff;
+ color:#a62924;
+ border:3px solid #a62924 !important;
+}
+
+.btn {
+ font-weight:800;
+ border:3px solid #ffffff !important;
+}
+.btn:hover {
+}
+
+.container-background {
+ background: #353535;
+}
+
+.checkout {
+ font-size:16px;
+}
+
+.checkout h1 {
+ font-size:22px;
+}
+
+.checkout h2 {
+ font-size:18px;
+}
+
+.checkout .userid {
+ font-size:18px;
+}
+
+.checkout .header1 {
+ border-bottom:1px solid #a83135;
+}
+
+.checkout .userid {
+ border:2px solid #ffffff !important;
+}
+
+.checkout .item_table td {
+ font-size:18px;
+ border:2px solid #ffffff;
+}
+
+.scko-table-striped>tbody>tr:nth-of-type(odd) {
+ background-color: #ffffff;
+ border: 2px solid #f2f227;
+ color:#000000;
+}
+.scko-table-striped>tbody>tr:nth-of-type(even) {
+ border: 2px solid #ffffff;
+}
+
+.checkout .status_box {
+ color:red;
+ font-weight:800;
+}
+
+.checkout .oils-selfck-status-div {
+ color: blue;
+ font-weight:800;
+}
+
+.checkout_failure {
+ color: red !important;
+ font-weight:800;
+}
+@media screen and (min-width:768px) {
+ .scko-footer-btn {
+ background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #008ec2), color-stop(1, #023a4f));
+ background:-moz-linear-gradient(top, #008ec2 5%, #023a4f 100%);
+ background:-webkit-linear-gradient(top, #008ec2 5%, #023a4f 100%);
+ background:-o-linear-gradient(top, #008ec2 5%, #023a4f 100%);
+ background:-ms-linear-gradient(top, #008ec2 5%, #023a4f 100%);
+ background:linear-gradient(to bottom, #008ec2 5%, #023a4f 100%);
+ font-size:18px;
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#008ec2', endColorstr='#023a4f',GradientType=0);
+ background-color:#02729E;
+ color:#ffffff;
+ text-shadow:0px 1px 5px #000000;
+ border-bottom:0 !important;
+ }
+
+ .scko-footer-btn:hover {
+ background:none;
+ text-shadow:none;
+ filter:none;
+ background-color:#ffffff;
+ color:#008ec2 !important;
+ border-bottom:0 !important;
+ }
+}
\ No newline at end of file
/* CSS Document */
html, body {
- margin:0;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 18px;
- background:#fff;
- width:100%;
+ margin:auto;
+ font-family: Arial, Helvetica, sans-serif;
+ height:100%;
+ width:100%;
+ overflow:hidden;
}
img {
- border: none;
+ border: none;
}
a {
- color: #003399;
- text-decoration: none;
+ text-decoration: none;
}
a:hover {
- text-decoration: underline;
+ text-decoration: underline;
}
h1 {
- margin:0;
- margin-bottom: 5px;
- font-size: 22px;
- font-weight:normal;
+ margin:0;
+ margin-bottom: 5px;
+ font-weight:normal;
}
h2 {
- margin:0;
- margin-bottom: 5px;
- font-size: 20px;
- font-weight:bold;
+ margin:0;
+ margin-bottom: 5px;
+ font-weight:bold;
}
-#header {
- color: #bda964;
- font-weight:bold;
- padding: 12px 0px 9px 17px;
- width: 694px;
- margin: auto;
+#main-content-scko .wide-input {
+ width: 90%;
}
-#content-wrapper {
- background: white;
+#main-content-scko label {
+ font-weight: bold;
}
-#main-content {
- width: 694px;
- margin:auto;
- padding-left:17px;
+#main-content-scko h1 {
+ font-weight: bold;
}
-.checkout {
- font-size:18px;
+#main-content-scko h2 {
+ font-weight: bold;
}
-.checkout h1 {
- font-size:36px;
+#main-content-scko li {
+ list-style- type: none;
}
-.checkout h2 {
- font-size:24px;
+.pad-vert {
+ padding : 10px 0px 10px 0px;
}
-
-.checkout .sidebar h3 {
- font-size: 19px;
- margin:0;
- padding-left:3px;
+.pad-vert-btn {
+ padding-bottom: 5px;
}
-.checkout .sidebar a {
- font-size:18px;
+.navbar-brand {
+ padding: 0px;
}
-
-.checkout .sidebar a span {
- font-weight:bold;
+.navbar-scko {
+ /*width: 91%;*/
+ height:5vh;
+ border:0;
+ margin: auto;
+ text-align: center;
}
-
-.checkout .sidebar p {
- margin:4px 0px;
- padding:3px;
+.navbar-scko-container {
+ position: absolute;
+ top: 15%;
+ left: 40%;
}
-.checkout .sidebar div, .checkout .sidebar p {
- font-size: 18px;
- line-height: 1em;
+.scko-container {
+ font-family: 'Open Sans', sans-serif;
+ letter-spacing: .5pt;
+ width: 91%; /* to match bibliocms */
+ margin:auto;
+ margin-top:10px;
+ margin-bottom:10px;
+ height: 70%;
+ padding:10px 20px;
}
-
-.checkout input[type=text], .checkout input[type=password] {
- border: 2px solid black;
- width:300px;
- height:22px;
- padding:2px;
- padding-top:1px;
- margin:0px;
- font-size:18px;
+.scko-image {
+ max-height:80%;
+ max-width:80%;
}
-
-.checkout .sidebar {
- background: #b0b0b0;
- border-left:2px ridge #eee;
- border-right:2px ridge #eee;
- border-bottom:2px ridge #eee;
- padding:10px 7px;
+.scko-btn-to-checkout {
+ height:18px;
+ width:28px;
+}
+.scko-logo {
+ width:100%;
+ height:100%;
}
-.checkout .sidebar .top {
- float:right;
- padding-right:5px;
+.scko-display {
+ display:block !important;
+}
+.scko-footer {
+ width:80%;
+ position: absolute;
+ bottom: 0;
+ left: 10%;
+ transform: translateX(0%), translateY(10%);
+}
+.scko-table {
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+@media screen and (max-height:584px) {
+ .scko-table {
+ height:55%;
+ }
+}
+@media screen and (min-height:585px) and (max-height:684px) {
+ .scko-table {
+ height:65%;
+ }
}
+@media screen and (min-height:685px) and (max-height:784px) {
+ .scko-table {
+ height:75%;
+ }
+}
+@media screen and (min-height:785px) {
+ .scko-table {
+ height:85%;
+ }
+}
+@media screen and (max-width:767px) {
-.checkout .sidebar .greet {
- clear:both;
- padding:15px 3px;
+ .scko-footer-btn {
+ border-radius:0;
+ width:100%;
+ }
+ .scko-action-btn {
+ float:right;
+ }
+}
+@media screen and (min-width:768px) {
+ .container-background {
+ overflow-y:hidden;
+ }
+ .scko-footer-btn {
+ height:100px;
+ border-radius:8px 8px 0 0;
+ display:flex;
+ cursor:pointer;
+ font-family:Arial;
+ font-weight:bold;
+ margin-bottom: 0;
+ text-align:center;
+ text-decoration:none;
+ align-items: center;
+ justify-content: center;
+ }
+ .scko-footer-btn:active {
+ position:relative;
+ top:1px;
+ }
+}
+.scko-table-ready {
+ font-weight:bold;
+}
+.scko-table-holds {
+ font-weight:normal;
+}
+.scko-table-suspended {
+ font-weight:regular;
+}
+
+.container-background {
+ height:100%;
+ width:100%;
+}
+.container-buffer {
+ margin-bottom: 12px;
}
-.checkout .sidebar .selected {
- background:#999
+#header {
+ font-weight:bold;
}
.checkout .header1 {
- height:108px;
- border-bottom:1px solid #a83135;
- padding-top:20px;
+ height:98px;
+ padding-top:20px;
}
.checkout .userid {
- width:200px !important;
- font-size:18px;
- font-weight:bold;
- padding:5px 6px 6px 6px !important;
- border:2px solid black !important;
- background: none !important;
- margin:0 !important;
+ width:200px !important;
+ font-weight:bold;
+ padding:5px 6px 6px 6px !important;
+ background: none !important;
+ margin:0 !important;
}
.checkout .item_table {
- border-collapse: collapse;
+ border-collapse: collapse;
}
.checkout .item_table td {
- font-size:18px;
- border:2px solid black;
- text-align: left;
+ text-align: left;
+}
+.scko-height {
+ height:100%;
}
-.checkout .item_table table td.label {
- font-weight:bold;
- text-transform: uppercase;
- text-align: right;
- white-space:nowrap;
- padding-right:5px;
- width:1px;
+.scko-table-label {
+ font-weight:bold;
+ text-transform: uppercase;
+ text-align: right;
+ white-space:nowrap;
+ padding-right:10px;
}
.checkout .item_table table td {
- border:none;
+ border:none;
+ width:100%;
+ display:block;
}
.checkout #back_button:hover {
- text-decoration: none;
+ text-decoration: none;
}
.checkout .status_box {
- color:red;
- font-weight:bold;
- height:20px;
+ font-weight:bold;
+ height:20%;
}
.checkout .oils-selfck-status-div {
- height:inherit !important;
- vertical-align:inherit !important;
- font-size: 18px;
- font-weight: bold;
- color: blue;
-}
-
-.checkout_failure {
- color: red !important;
-}
-
-.suspHold {
-color:#A8A8A8;
+ font-size: 18px;
+ font-weight: bold;
}
#oils-base-body-block {
- height: auto;
+ height: 100% !important;
}
body .dijitAlignClient {
- position:inherit;
+ position:inherit;
}
.dijitLayoutContainer {
- position: inherit;
+ position: inherit;
}
#oils-base-content-block {
- height: auto !important;
- width: auto !important;
- padding:0;
+ height: 100% !important;
+ width: 100%;
+ padding:0;
}
-
#oils-base-main-block {
- height: auto !important;
- width: auto !important;
+ height: 100% !important;
+ width: 100%;
}
#oils-base-header-block {
- width:0px !important;
+ width:0px !important;
}
-
+.hideMe {
+ display: none;
+}
\ No newline at end of file
"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}",
+ "DOUBLE_SCAN" : "${0} was already successfully processed.",
"WELCOME_BANNER" : "Welcome, ${0}",
"ENTER_PASSWORD" : "Please enter your password",
"PLEASE_LOGIN" : "Please log in with your username or library barcode.",
var selfckWarningTimer;
var selfCheckManager;
+var barcodesSeen = {};
+var scannedBarcode = 0;
var selfCheckMgr;
var itemsOutCirc = [];
var itemsOutMod = [];
var itemsOutCopy = [];
var readyHolds = false;
-var holdsCounter = 0
const SET_BARCODE_REGEX = 'opac.barcode_regex';
const SET_PATRON_TIMEOUT = 'circ.selfcheck.patron_login_timeout';
if (!selfckWarningSetup) {
selfckWarningSetup = true;
- dojo.connect(oilsSelfckLogout, 'onClick',
+ dojo.connect(oilsSelfckLogout, 'onClick',
function() {
clearTimeout(selfckWarningTimer);
oilsSelfckLogoutDialog.hide();
}
);
- dojo.connect(oilsSelfckContinue, 'onClick',
+ dojo.connect(oilsSelfckContinue, 'onClick',
function() {
clearTimeout(selfckWarningTimer);
oilsSelfckLogoutDialog.hide();
selfckWarningTimer = setTimeout(
function() {
- // no action was taken, force a logout.
+ // no action was taken, force a logout
oilsSelfckLogoutDialog.hide();
selfCheckMgr.logoutPatron();
},
}
function SelfCheckManager() {
- selfCheckMgr = this;
- switchTo('step1');
-
- this.timer = null;
+ selfCheckMgr = this;
+ switchTo('step1');
+
+ this.timer = null;
this.cgi = new openils.CGI();
this.staff = null;
this.workstation = null;
this.itemsOut = [];
this.holdsArray = [];
- // During renewals, keep track of the ID of the previous circulation.
+ // During renewals, keep track of the ID of the previous circulation.
// Previous circ is used for tracking failed renewals (for receipts).
this.prevCirc = null;
}
return;
}
-
+
var self = this;
// connect onclick handlers to the various navigation links
var linkHandlers = {
'oils-selfck-hold-details-link' : function() { self.drawHoldsPage(); },
- 'oils-selfck-view-fines-link' : function() { self.drawFinesPage(); openils.Util.show('oils-selfck-fines-tbody'); openils.Util.hide('pay_fines'); },
- 'oils-selfck-pay-fines-link' : function() {
- switchTo('step3','step3c');
- openils.Util.hide('oils-selfck-fines-tbody');
- openils.Util.show('pay_fines');
- self.drawPayFinesPage(
- self.patron,
- self.getSelectedFinesTotal(),
- self.getSelectedFineTransactions(),
- function(resp) {
- var evt = openils.Event.parse(resp);
- if(evt) {
- var message = evt + '';
- if(evt.textcode == 'CREDIT_PROCESSOR_DECLINED_TRANSACTION' && evt.payload)
- message += '\n' + evt.payload.error_message;
- self.handleAlert(message, true, 'payment-failure');
- return;
- }
- self.patron.last_xact_id(resp.last_xact_id);
- self.printPaymentReceipt(
- resp,
- function() {
- self.updateFinesSummary();
- self.drawFinesPage();
- }
- );
- }
- );
+ 'oils-selfck-view-fines-link' : function() {
+ self.drawFinesPage();
+ openils.Util.show('oils-selfck-fines-tbody');
},
- //'oils-selfck-nav-home' : function() { self.drawCircPage(); },
+ 'oils-selfck-nav-return-login' : function() { window.location.reload() },
'oils-selfck-nav-logout' : function() { self.logoutPatron(); },
'oils-selfck-nav-logout-print' : function() { self.logoutPatron(true); },
+ 'oils-selfck-nav-logout-email' : function() { self.logoutPatron(false, true); },
'oils-selfck-items-out-details-link' : function() { self.drawItemsOutPage(); },
- //'oils-selfck-print-list-link' : function() { self.printList(); }
- 'oils-selfck-nav-logout-email' : function() { self.logoutPatronWithEmail(true); }
+ 'oils-selfck-items-out-renew-details-link' : function() { self.drawItemsOutPage(); }
}
for(var id in linkHandlers) {
- //var obj1 = dojo.byId(id);
- //obj1.onclick = linkHandlers[id];
dojo.connect(dojo.byId(id), 'onclick', linkHandlers[id]);
- }
+ }
if(this.cgi.param('patron')) {
}
-SelfCheckManager.prototype.getSelectedFinesTotal = function() {
- var total = 0;
- dojo.forEach(
- dojo.query("[name=selector]", this.finesTbody),
- function(input) {
- if(input.checked)
- total += Number(input.balance_owed);
- }
- );
- return total.toFixed(2);
-};
-
-SelfCheckManager.prototype.getSelectedFineTransactions = function() {
- return dojo.query("[name=selector]", this.finesTbody).
- filter(function (o) { return o.checked }).
- map(
- function (o) {
- return [
- o.getAttribute("xact"),
- Number(o.balance_owed).toFixed(2)
- ];
- }
- );
-};
-
/**
* Registers a new workstion
*/
oilsSelfckWsDialog.show();
new openils.User().buildPermOrgSelector(
- 'REGISTER_WORKSTATION',
- oilsSelfckWsLocSelector,
+ 'REGISTER_WORKSTATION',
+ oilsSelfckWsLocSelector,
this.staff.home_ou()
);
var self = this;
- dojo.connect(oilsSelfckWsSubmit, 'onClick',
+ dojo.connect(oilsSelfckWsSubmit, 'onClick',
function() {
oilsSelfckWsDialog.hide();
- var name = oilsSelfckWsLocSelector.attr('displayedValue') + '-' + oilsSelfckWsName.attr('value');
+ var name = oilsSelfckWsLocSelector.attr('displayedValue') +
+ '-' + oilsSelfckWsName.attr('value');
var res = fieldmapper.standardRequest(
['open-ils.actor', 'open-ils.actor.workstation.register'],
this.orgSettings[k] = settings[k].value;
}
- if(settings[SET_BARCODE_REGEX])
+ if(settings[SET_BARCODE_REGEX])
this.patronBarcodeRegex = new RegExp(settings[SET_BARCODE_REGEX].value);
- // Subtract the timeout warning interval from the configured timeout
+ // Subtract the timeout warning interval from the configured timeout
// so that when taken together they add up to the configured amount.
if(settings[SET_PATRON_TIMEOUT]) {
patronTimeout =
- (parseInt(settings[SET_PATRON_TIMEOUT].value) * 1000)
+ (parseInt(settings[SET_PATRON_TIMEOUT].value) * 1000)
- patronTimeoutWarning;
}
}
msg : 'Please log in with your library barcode.', // TODO
handler : bcHandler
});
-
- var txtBox = (dojo.byId('step2').style.display=='none') ? 'patron-login-username' : 'patron-login-password';
- try{var a=dojo.byId(txtBox);a.focus();a.select();}catch(e){}
+
+ try {
+ var a = dojo.byId('patron-login-username');
+ a.focus();
+ a.select();
+ } catch(e) {}
SelfCheckManager.fail_count = 0;
}
// reset timeout
selfckResetTimer();
-
+
//if(this.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) { // password always reqired, per KCLS - fail safe
if(!passwd) {
// would only happen in dev/debug mode when using the patron= param
- alert('password required by org setting. remove patron= from URL');
+ alert('password required by org setting. remove patron= from URL');
return;
}
if (this.fail_count > 0) {
// Barcode and PIN are the same, but fails login? That means double scan
this.handleAlert(localeStrings.LOGIN_BARCODE_DOUBLE, false, 'login-failure');
- openils.Util.show('back_to_login');
}
} else {
this.handleAlert(
false, 'login-failure'
);
this.drawLoginPage();
- openils.Util.show('back_to_login');
}
return;
}
- //}
+ //}
// retrieve the fleshed user by barcode
var patron_id = fieldmapper.standardRequest(
false, 'login-failure'
);
this.drawLoginPage();
- openils.Util.show('back_to_login');
} else {
dojo.string.substitute(localeStrings.WELCOME_BANNER, [this.patron.first_given_name()]);
dojo.byId('oils-selfck-status-div').innerHTML = '';
dojo.byId('oils-selfck-status-div2').innerHTML = '';
- dojo.byId('oils-selfck-status-div3').innerHTML = '';
- openils.Util.hide('back_to_login');
- if(this.patron.email() && this.patron.email().match(/.+@.+/) != null){
- openils.Util.removeCSSClass( dojo.byId('oils-selfck-nav-logout-email'), 'hidden' );
- }
+ if(this.patron.email() && this.patron.email().match(/.+@.+/) != null){
+ openils.Util.removeCSSClass( dojo.byId('oils-selfck-nav-logout-email'), 'hidden' );
+ }
this.drawCircPage();
}
}
console.log("Handling alert " + message);
dojo.byId('oils-selfck-status-div').innerHTML = message;
- if(!this.patron){
- dojo.byId('oils-selfck-status-div2').innerHTML = message;
- dojo.byId('oils-selfck-status-div3').innerHTML = message;
- }
+ if(!this.patron){
+ dojo.byId('oils-selfck-status-div2').innerHTML = message;
+ dojo.byId('oils-selfck-status-div3').innerHTML = message;
+ }
if(shouldPopup)
else
openils.Util.removeCSSClass( dojo.byId('oils-selfck-status-div'), 'checkout_failure' );
- if(message && shouldPopup && this.orgSettings[SET_ALERT_POPUP])
+ if(message && shouldPopup && this.orgSettings[SET_ALERT_POPUP])
alert(message);
if(this.orgSettings[SET_ALERT_SOUND])
if(args.handler) {
selfckScanBox._lastHandler = dojo.connect(
- selfckScanBox,
+ selfckScanBox,
'onKeyDown',
function(e) {
if(e.keyCode == dojo.keys.ESCAPE)
selfCheckMgr.logoutPatron(true);
- if(e.keyCode != dojo.keys.ENTER)
+ if(e.keyCode != dojo.keys.ENTER)
return;
args.handler(selfckScanBox.attr('value'));
}
*/
SelfCheckManager.prototype.drawCircPage = function() {
openils.Util.show('oils-selfck-circ-tbody', 'table-row-group');
- switchTo('step3');
+ switchTo('step3');
+ var timeScanned = new Date().getTime();
var self = this;
this.updateScanBox({
msg : 'Please enter an item barcode', // TODO i18n
- handler : function(barcode) {
- openils.Util.show('oils-selfck-fines-tbody');
- openils.Util.hide('pay_fines'); switchTo('step3');
- self.checkout(barcode); }
+ handler : function(barcode) {
+ barcodesSeen[scannedBarcode] = barcode;
+ var selfckScanbox = document.getElementById('selfckScanBox');
+ if(barcodesSeen[scannedBarcode - 1] == barcode ){
+ if(new Date().getTime() - timeScanned < 5000){
+ console.log("Date: " + new Date().getTime());
+ console.log("Time scanned: " + timeScanned);
+ console.log(new Date().getTime() - timeScanned);
+ var message = dojo.string.substitute(localeStrings.DOUBLE_SCAN, [barcode]);
+ dojo.byId('oils-selfck-status-div').innerHTML = message;
+ };
+ selfckScanbox.value = '';
+ selfckScanbox.focus();
+ } else {
+ scannedBarcode++;
+ timeScanned = new Date().getTime();
+ switchTo('step3');
+ self.checkout(barcode);
+ }
+ }
});
if(!this.circTemplate)
// render mock checkouts for debugging?
if(this.mockCheckouts) {
- for(var i in [1,2,3])
+ for(var i in [1,2,3])
this.displayCheckout(this.mockCheckout, 'checkout');
}
}
SelfCheckManager.prototype.updateFinesSummary = function() {
- var self = this;
+ var self = this;
// fines summary
fieldmapper.standardRequest(
params : [this.authtoken, this.patron.id()],
oncomplete : function(r) {
var summary = openils.Util.readResponse(r);
- var finesSum = dojo.byId('acct_fines');
- var bal = summary ? summary.balance_owed() : 0;
- var bal2 = parseFloat(bal);
-
- if(bal2>0) {finesSum.style.color="red"; openils.Util.show('oils-selfck-pay-fines-link');}
- finesSum.innerHTML = dojo.string.substitute(localeStrings.TOTAL_FINES_ACCOUNT, [bal2.toFixed(2)]);
- self.creditPayableBalance = bal2+'';
+ var finesSum = dojo.byId('acct_fines');
+ var bal = summary ? summary.balance_owed() : 0;
+ var bal2 = parseFloat(bal);
+
+ self.creditPayableBalance = bal2 + '';
}
}
);
SelfCheckManager.prototype.drawItemsOutPage = function() {
- switchTo('step3','step3d');
-
- // Reset items checked out in case it changed
- this.circSummary = undefined;
+ switchTo('step3','step3d');
+
+ // Reset items checked out in case it changed
+ this.circSummary = undefined;
this.updateCircSummary();
- if(!this.outTemplate)
+ if(!this.outTemplate)
this.outTemplate = this.itemsOutTbody.removeChild(dojo.byId('oils-selfck-circ-out-row'));
while(this.itemsOutTbody.childNodes[0])
this.itemsOutTbody.removeChild(this.itemsOutTbody.childNodes[0]);
progressDialog.show(true);
var self = this;
-
+
fieldmapper.standardRequest(
['open-ils.circ', 'open-ils.circ.actor.user.checked_out.atomic'],
{
params : [this.authtoken, this.patron.id()],
oncomplete : function(r) {
var resp = openils.Util.readResponse(r);
-
var circs = resp.sort(
function(a, b) {
if(a.circ.due_date() > b.circ.due_date())
handleCheckedItems(circ);
}
);
- progressDialog.hide();
+ progressDialog.hide();
}
}
);
}
function handleCheckedItems(circ) {
- var self = selfCheckMgr;
- var row = self.outTemplate.cloneNode(true);
-
- self.byName(row,'barcode').innerHTML = circ.copy.barcode();
- self.byName(row,'title').innerHTML = circ.record.title();
- self.byName(row,'author').innerHTML = circ.record.author();
- if(dojo.date.stamp.fromISOString(circ.circ.due_date())<(new Date())) self.byName(row,'due_date').style.color="red";
- self.byName(row,'due_date').innerHTML = dojo.date.locale.format(dojo.date.stamp.fromISOString(circ.circ.due_date()), {selector: 'date', fullYear: true});
- self.byName(row,'format').innerHTML = circ.record.types_of_resource()[0];
-
- self.itemsOutTbody.appendChild(row);
+ var self = selfCheckMgr;
+ var row = self.outTemplate.cloneNode(true);
+
+ self.byName(row,'barcode').innerHTML = circ.copy.barcode();
+ self.byName(row,'title').innerHTML = circ.record.title();
+ self.byName(row,'author').innerHTML = circ.record.author();
+ if(dojo.date.stamp.fromISOString(circ.circ.due_date())<(new Date())) self.byName(row,'due_date').style.color="red";
+ self.byName(row,'due_date').innerHTML = dojo.date.locale.format(dojo.date.stamp.fromISOString(circ.circ.due_date()), {
+ selector: 'date', fullYear: true
+ });
+ self.byName(row,'format').innerHTML = circ.record.types_of_resource()[0];
+
+ self.itemsOutTbody.appendChild(row);
}
SelfCheckManager.prototype.goToTab = function(name) {
openils.Util.hide('oils-selfck-payment-page');
openils.Util.hide('oils-selfck-holds-page');
openils.Util.hide('oils-selfck-circ-page');
- openils.Util.hide('oils-selfck-pay-fines-link');
// reset timeout
selfckResetTimer();
-
+
switch(name) {
case 'checkout':
openils.Util.show('oils-selfck-circ-page');
case 'fines':
openils.Util.show('oils-selfck-fines-page');
break;
- case 'payment':
- openils.Util.show('oils-selfck-payment-page');
- break;
}
}
case 'holds':
this.printHoldsReceipt();
break;
- case 'rdyHolds':
+ case 'ready':
readyHolds = true;
this.printHoldsReceipt();
readyHolds = false;
this.holdsSummary.total += Number(summary[i]);
}
- dojo.byId('oils-selfck-holds-total').innerHTML =dojo.string.substitute("${0}) Item"+(this.holdsSummary.total==1?"":"s"),[this.holdsSummary.total]);
+ dojo.byId('oils-selfck-holds-total')
+ .innerHTML = dojo.string.substitute("${0} Hold" +
+ (this.holdsSummary.total == 1 ? "" : "s"),
+ [this.holdsSummary.total]
+ );
+ dojo.byId('oils-selfck-holds-ready').innerHTML = this.holdsSummary.ready;
+
}
this.circSummary.total += 1;
this.circSummary.session += 1;
}
-
- dojo.byId('oils-selfck-circ-account-total').innerHTML = dojo.string.substitute("${0}) Item"+(this.circSummary.total==1?"":"s"), [this.circSummary.total]);
-
- /*
- dojo.byId('oils-selfck-circ-session-total').innerHTML =
- dojo.string.substitute(
- localeStrings.TOTAL_ITEMS_SESSION,
- [this.circSummary.session]
- );
- */
}
SelfCheckManager.prototype.drawHoldsPage = function() {
- switchTo('step3','step3f');
+ switchTo('step3','step3e');
+
this.holdTbody = dojo.byId('oils-selfck-hold-tbody');
this.readyTbody = dojo.byId('oils-selfck-rdy-tbody');
- this.suspendedTbody = dojo.byId('oils-selfck-susp-tbody');
- if(!this.readyTemplate)
+ this.suspendedTbody = dojo.byId('oils-selfck-suspended-tbody');
+ if(!this.readyTemplate) {
+ this.noReadyTemplate = this.readyTbody.removeChild(dojo.byId('oils-selfck-noready'));
this.readyTemplate = this.readyTbody.removeChild(dojo.byId('oils-selfck-rdy-row'));
+ }
if(!this.holdTemplate)
this.holdTemplate = this.holdTbody.removeChild(dojo.byId('oils-selfck-hold-row'));
- if(!this.suspTemplate)
- this.suspTemplate = this.suspendedTbody.removeChild(dojo.byId('oils-selfck-susp-row'));
+ if(!this.suspendedTemplate)
+ this.suspendedTemplate = this.suspendedTbody.removeChild(dojo.byId('oils-selfck-suspended-row'));
+
while(this.holdTbody.childNodes[0])
this.holdTbody.removeChild(this.holdTbody.childNodes[0]);
while(this.readyTbody.childNodes[0])
params : [self.authtoken, ids],
onresponse : function(rr) {
- progressDialog.hide();
+ progressDialog.hide();
self.holdsArray.push(openils.Util.readResponse(rr));
- self.drawHolds(self.holdsArray[holdsCounter]);
- holdsCounter++;
}
}
);
}
}
);
- holdsCounter = 0;
+ self.drawHolds(self.holdsArray);
}
/**
SelfCheckManager.prototype.drawHolds = function(holds) {
this.holds = holds;
progressDialog.hide();
-
- var data = holds;
- if(!data) return;
- var row = this.holdTemplate.cloneNode(true);
- var row2 = this.readyTemplate.cloneNode(true);
- var row3 = this.suspTemplate.cloneNode(true);
- //if(data.mvr.isbn()) {
- // this.byName(row, 'jacket').setAttribute('src', '/opac/extras/ac/jacket/small/' + data.mvr.isbn());
- //}
-
- if(data.status == 4) {
- this.byName(row2, 'title').innerHTML = data.mvr.title();
- this.byName(row2, 'format').innerHTML = data.mvr.types_of_resource()[0];
- this.byName(row2, 'lib').innerHTML = fieldmapper.aou.findOrgUnit(data.hold.pickup_lib()).name();
- if(dojo.date.stamp.fromISOString(data.hold.shelf_expire_time())<(new Date())) this.byName(row2, 'date').style.color="red";
- this.byName(row2, 'date').innerHTML = dojo.date.locale.format(dojo.date.stamp.fromISOString(data.hold.shelf_expire_time()), {selector: 'date', fullYear: true});
- this.readyTbody.appendChild(row2);
- } else if(data.status == 7) {
- this.byName(row, 'title').innerHTML = data.mvr.title();
- this.byName(row, 'author').innerHTML = data.mvr.author();
- this.byName(row, 'format').innerHTML = data.mvr.types_of_resource()[0];
- this.byName(row, 'status').innerHTML = dojo.string.substitute(localeStrings.HOLD_STATUS_WAITING,[data.queue_position, data.potential_copies]);
- this.suspendedTbody.appendChild(row);
- } else {
-
- this.byName(row, 'title').innerHTML = data.mvr.title();
- this.byName(row, 'author').innerHTML = data.mvr.author();
- this.byName(row, 'format').innerHTML = data.mvr.types_of_resource()[0];
-
- // hold is still pending
- this.byName(row, 'status').innerHTML = dojo.string.substitute(localeStrings.HOLD_STATUS_WAITING,[data.queue_position, data.potential_copies]);
- this.holdTbody.appendChild(row);
- }
+
+ var readyHolds = [];
+ var suspendedHolds = [];
+ var regularHolds = [];
+
+ for(var hold = 0; hold < holds.length; hold++) {
+ if(holds[hold].status == 4) {
+ readyHolds.push(holds[hold]);
+ } else if(holds[hold].status == 7) {
+ suspendedHolds.push(holds[hold]);
+ } else {
+ regularHolds.push(holds[hold]);
+ }
+ }
+ if(readyHolds.length) {
+ for(hold = 0; hold < readyHolds.length; hold++) {
+ var row2 = this.readyTemplate.cloneNode(true);
+ this.byName(row2, 'title').innerHTML = readyHolds[hold].mvr.title();
+ this.byName(row2, 'author').innerHTML = readyHolds[hold].mvr.author();
+ this.byName(row2, 'status').innerHTML = "Ready for pickup";
+ this.readyTbody.appendChild(row2);
+ }
+ } else {
+ var noRow2 = this.noReadyTemplate.cloneNode(true);
+ this.readyTbody.appendChild(noRow2);
+ }
+ if(suspendedHolds.length) {
+ for(hold = 0; hold < suspendedHolds.length; hold++) {
+ var row3 = this.suspendedTemplate.cloneNode(true);
+ this.byName(row3, 'title').innerHTML = suspendedHolds[hold].mvr.title();
+ this.byName(row3, 'author').innerHTML = suspendedHolds[hold].mvr.author();
+ this.byName(row3, 'status').innerHTML = dojo.string.substitute(
+ localeStrings.HOLD_STATUS_WAITING,
+ [suspendedHolds[hold].queue_position]
+ );
+ this.suspendedTbody.appendChild(row3);
+ }
+ }
+ if(regularHolds.length) {
+ for(hold = 0; hold < regularHolds.length; hold++) {
+ var row = this.holdTemplate.cloneNode(true);
+ this.byName(row, 'title').innerHTML = regularHolds[hold].mvr.title();
+ this.byName(row, 'author').innerHTML = regularHolds[hold].mvr.author();
+
+ // hold is still pending
+ this.byName(row, 'status').innerHTML = dojo.string.substitute(
+ localeStrings.HOLD_STATUS_WAITING,
+ [regularHolds[hold].queue_position]
+ );
+ this.holdTbody.appendChild(row);
+ }
+ }
}
// TODO add option to hid scanBox
// this.updateScanBox(...)
- //this.goToTab('fines');
- switchTo('step3','step3c');
+ switchTo('step3','step3c');
progressDialog.show(true);
- //if(this.creditPayableBalance > 0 && this.orgSettings[SET_CC_PAYMENT_ALLOWED])
- // openils.Util.show('oils-selfck-pay-fines-link', 'inline');
-
-
this.finesTbody = dojo.byId('oils-selfck-fines-tbody');
if(!this.finesTemplate)
this.finesTemplate = this.finesTbody.removeChild(dojo.byId('oils-selfck-fines-row'));
while(this.finesTbody.childNodes[0])
this.finesTbody.removeChild(this.finesTbody.childNodes[0]);
-/*
- // when user clicks on a selector checkbox, update the total owed
- var updateSelected = function() {
- var total = 0;
- dojo.forEach(
- dojo.query('[name=selector]', this.finesTbody),
- function(input) {
- if(input.checked)
- total += Number(input.getAttribute('balance_owed'));
- }
- );
-
- total = total.toFixed(2);
- dojo.byId('oils-selfck-selected-total').innerHTML =
- dojo.string.substitute(localeStrings.TOTAL_FINES_SELECTED, [total]);
- }
-
- // wire up the batch on/off selector
- var sel = dojo.byId('oils-selfck-fines-selector');
- sel.onchange = function() {
- dojo.forEach(
- dojo.query('[name=selector]', this.finesTbody),
- function(input) {
- input.checked = sel.checked;
- }
- );
- };
-*/
var self = this;
var handler = function(dataList) {
self.finesCount = dataList.length;
self.finesData = dataList;
+ var outstandingFines = [];
- for(var i in dataList) {
-
+ for(var i = 0; i < dataList.length; i++) {
var data = dataList[i];
+ if(data.transaction.balance_owed() > 0) {
+ outstandingFines.push(data);
+ }
+ }
+
+ for(var fine = 0; fine < outstandingFines.length; fine++) {
var row = self.finesTemplate.cloneNode(true);
+ var data = outstandingFines[fine];
var type = data.transaction.xact_type();
if(type == 'circulation') {
self.byName(row, 'title').innerHTML = data.record.title();
- if(dojo.date.stamp.fromISOString(data.circ.due_date())<(new Date())) self.byName(row, 'due_date').style.color="red";
- self.byName(row, 'due_date').innerHTML = dojo.date.locale.format(dojo.date.stamp.fromISOString(data.circ.due_date()), {selector: 'date', fullYear: true});
- self.byName(row, 'date_return').innerHTML = (data.circ.checkin_time())?dojo.date.locale.format(dojo.date.stamp.fromISOString(data.circ.checkin_time()), {selector: 'date', fullYear: true}):"";
+ if(dojo.date.stamp.fromISOString(data.circ.due_date()) < (new Date()))
+ self.byName(row, 'due_date').style.color="red";
+ self.byName(row, 'due_date').innerHTML = dojo.date.locale.format(dojo.date.stamp.fromISOString(
+ data.circ.due_date()),
+ {selector: 'date', fullYear: true}
+ );
+ self.byName(row, 'date_return').innerHTML = (data.circ.checkin_time()) ? dojo.date.locale.format(
+ dojo.date.stamp.fromISOString(data.circ.checkin_time()),
+ {selector: 'date', fullYear: true}
+ ) : "";
} else if(type == 'grocery') {
- self.byName(row, 'title').innerHTML = (data.transaction.last_billing_type())?("Miscellaneous - "+data.transaction.last_billing_type()):"Miscellaneous"; // Go ahead and head off any confusion around "grocery". TODO i18n
+ self.byName(row, 'title').innerHTML =
+ (data.transaction.last_billing_type()) ?
+ ("Miscellaneous - " + data.transaction.last_billing_type()) :
+ "Miscellaneous"; // Go ahead and head off any confusion around "grocery". TODO i18n
}
- //self.byName(row, 'total_owed').innerHTML = data.transaction.total_owed();
- //self.byName(row, 'total_paid').innerHTML = data.transaction.total_paid();
self.byName(row, 'balance').innerHTML = data.transaction.balance_owed();
- self.byName(row, 'selector').balance_owed = data.transaction.balance_owed();
- self.byName(row, 'selector').setAttribute('xact', data.transaction.id());
-/*
- // row selector
- var selector = self.byName(row, 'selector')
- selector.onchange = updateSelected;
- selector.setAttribute('xact', data.transaction.id());
- selector.setAttribute('balance_owed', data.transaction.balance_owed());
- selector.checked = true;
-*/
self.finesTbody.appendChild(row);
+ if(!self.byName(row,'due_date').innerHTML ) {
+ document.getElementsByClassName('dueDate')[fine].style.display = 'none';
+ }
+ if(!self.byName(row,'date_return').innerHTML) {
+ document.getElementsByClassName('dateReturn')[fine].style.display = 'none';
+ }
}
- //updateSelected();
}
var payload = result.payload || {};
var overrideEvents = this.orgSettings[SET_AUTO_OVERRIDE_EVENTS];
var blockStatuses = this.orgSettings[SET_BLOCK_CHECKOUT_ON_COPY_STATUS];
- result.payload = payload;
-
+ result.payload = payload;
+
if(result.textcode == 'NO_SESSION') {
return this.logoutStaff();
// Server says the item is already checked out. If it's checked out to the
// current user, we may need to renew it.
- if(payload.old_circ) {
+ if(payload.old_circ) {
/*
old_circ refers to the previous checkout IFF it's for the same user.
} else {
-
if(overrideEvents && overrideEvents.length) {
// see if the events we received are all in the list of
// events to override
-
+
if(!result.length) result = [result];
-
+
var override = true;
for(var i = 0; i < result.length; i++) {
if(override)
return { override : true };
}
-
+
this.updateScanBox();
popup = true;
sound = 'checkout-failure';
if(action == 'renew')
this.checkouts.push({circ : this.prevCirc, renewal_failure : true});
- if(result.length)
+ if(result.length)
result = result[0];
switch(result.textcode) {
]}
);
- console.log(js2JSON(result));
-
var stat = this.handleXactResult('renew', barcode, result);
if(stat.override)
var circ = evt.payload.circ;
var row = this.circTemplate.cloneNode(true);
- //if(record.isbn()) {
- // this.byName(row, 'jacket').setAttribute('src', '/opac/extras/ac/jacket/small/' + record.isbn());
- //}
-
this.byName(row, 'barcode').innerHTML = copy.barcode();
this.byName(row, 'title').innerHTML = record.title();
- //this.byName(row, 'author').innerHTML = record.author();
- //this.byName(row, 'remaining').innerHTML = circ.renewal_remaining();
openils.Util.show(this.byName(row, type));
var date = dojo.date.stamp.fromISOString(circ.due_date());
- this.byName(row, 'due_date').innerHTML =
+ this.byName(row, 'due_date').innerHTML =
dojo.date.locale.format(date, {selector : 'date'});
// put new circs at the top of the list
SelfCheckManager.prototype.initPrinter = function() {
try { // Mozilla only
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesRead');
netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesWrite');
if (pref)
pref.setBoolPref('print.always_print_silent', true);
} catch(E) {
- console.log("Unable to initialize auto-printing");
+ console.log("Unable to initialize auto-printing");
}
}
// collect the circs and failure info
dojo.forEach(
- this.checkouts,
+ this.checkouts,
function(blob) {
circIds.push(blob.circ);
circCtx.push({renewal_failure:blob.renewal_failure});
);
var params = [
- this.authtoken,
+ this.authtoken,
this.staff.ws_ou(),
null,
'format.selfcheck.checkout',
var resp = openils.Util.readResponse(r);
var output = resp.template_output();
if(output) {
- self.printData(output.data(), self.checkouts.length, callback);
+ self.printData(output.data(), self.checkouts.length, callback);
} else {
var error = resp.error_output();
if(error) {
}
SelfCheckManager.prototype.printData = function(data, numItems, callback) {
- var win = window.open('', '', 'resizable,width=350,height=250,scrollbars=1');
+ var win = window.open('', '', 'resizable,width=350,height=250,scrollbars=1');
win.document.body.innerHTML = data;
win.print();
* a small buffer
*/
var sleepTime = 1000;
- if(numItems > 0)
+ if(numItems > 0)
sleepTime += (numItems / 2) * 1000;
setTimeout(
- function() {
+ function() {
win.close(); // close the print window
if(callback) callback(); // fire callback to return to main page
},
- sleepTime
+ sleepTime
);
}
progressDialog.show(true);
var params = [
- this.authtoken,
+ this.authtoken,
this.staff.ws_ou(),
null,
'format.selfcheck.items_out',
var self = this;
fieldmapper.standardRequest(
['open-ils.circ', 'open-ils.circ.fire_circ_trigger_events'],
- {
+ {
async : false,
params : params,
oncomplete : function(r) {
var resp = openils.Util.readResponse(r);
var output = resp.template_output();
if(output) {
- self.printData(output.data(), self.itemsOut.length, callback);
+ self.printData(output.data(), self.itemsOut.length, callback);
} else {
var error = resp.error_output();
if(error) {
/**
- * Print a receipt for this user's items out
+ * Print a receipt for this user's holds
*/
SelfCheckManager.prototype.printHoldsReceipt = function(callback) {
if(!this.holdsArray.length) return;
var holdData = [];
var rdyForPickup = false;
- if(readyHolds){
- dojo.forEach(this.holdsArray,
- function(data) {
- if(data.status == 4) {
- holdIds.push(data.hold.id());
- holdData.push({ready : true});
- rdyForPickup = true;
+ if(readyHolds) {
+ dojo.forEach(this.holdsArray,
+ function(data) {
+ if(data.status == 4) {
+ holdIds.push(data.hold.id());
+ holdData.push({ready : true});
+ rdyForPickup = true;
+ }
}
+ );
+ if(!rdyForPickup) {
+ progressDialog.hide();
+ return;
+
}
+ } else {
- );
- if (!rdyForPickup){
- progressDialog.hide();
- return};
- } else {
- dojo.forEach(this.holdsArray,
- function(data) {
- holdIds.push(data.hold.id());
- if(data.status == 4) {
- holdData.push({ready : true});
- } else {
- holdData.push({
- queue_position : data.queue_position,
- potential_copies : data.potential_copies
- });
+ dojo.forEach(this.holdsArray,
+ function(data) {
+ holdIds.push(data.hold.id());
+ if(data.status == 4) {
+ holdData.push({ready : true});
+ } else {
+ holdData.push({
+ queue_position : data.queue_position
+ });
+ }
}
- }
- );
- };
+ );
+ }
+
var params = [
- this.authtoken,
+ this.authtoken,
this.staff.ws_ou(),
null,
'format.selfcheck.holds',
var self = this;
fieldmapper.standardRequest(
['open-ils.circ', 'open-ils.circ.fire_hold_trigger_events'],
- {
+ {
async : false,
params : params,
oncomplete : function(r) {
);
}
-
-SelfCheckManager.prototype.printPaymentReceipt = function(paymentIds, callback) {
- var self = this;
- progressDialog.show(true);
-
- fieldmapper.standardRequest(
- ['open-ils.circ', 'open-ils.circ.money.payment_receipt.print'],
- {
- async : false,
- params : [this.authtoken, paymentIds],
- oncomplete : function(r) {
- var resp = openils.Util.readResponse(r);
- var output = resp.template_output();
- progressDialog.hide();
- if(output) {
- self.printData(output.data(), 1, callback);
- } else {
- var error = resp.error_output();
- if(error) {
- throw new Error("Error creating receipt: " + error.data());
- } else {
- throw new Error("No receipt data returned from server");
- }
- }
- }
- }
- );
-}
-
/**
* Print a receipt for this user's items out
*/
progressDialog.show(true);
var params = [
- this.authtoken,
+ this.authtoken,
this.staff.ws_ou(),
null,
'format.selfcheck.fines',
var self = this;
fieldmapper.standardRequest(
['open-ils.circ', 'open-ils.circ.fire_user_trigger_events'],
- {
+ {
async : false,
params : params,
oncomplete : function(r) {
var resp = openils.Util.readResponse(r);
var output = resp.template_output();
if(output) {
- self.printData(output.data(), self.finesCount, callback);
+ self.printData(output.data(), self.finesCount, callback);
} else {
var error = resp.error_output();
if(error) {
/**
* Logout the patron and return to the login page
*/
-SelfCheckManager.prototype.logoutPatron = function(print) {
+SelfCheckManager.prototype.logoutPatron = function(print, email) {
- var return_url = this.cgi.param('return-to') || location.href;
- progressDialog.show(true); // prevent patron from clicking logout link twice
+
+ var scannedBarcode = 0;
if(print && this.checkouts.length) {
+ progressDialog.show(true); // prevent patron from clicking logout link twice
this.printSessionReceipt(
function() {
- //also closes progress dialog
- location.href = return_url;
+ openils.Util.show('step4');
+ switchTo('step4');
+ this.processLogout();
+ //location.href = return_url;
+ }
+ );
+ } else if(email && this.checkouts.length) {
+ this.emailSessionReceipt(
+ function() {
+ openils.Util.show('step4');
+ switchTo('step4');
+ this.processLogout();
+ //location.href = return_url;
}
);
} else {
- location.href = return_url;
+ openils.Util.show('step4');
+ switchTo('step4');
+ this.processLogout();
+ //location.href = return_url;
}
}
+SelfCheckManager.prototype.processLogout = function() {
+ var return_url = this.cgi.param('return-to') || location.href;
+
+ this.timer = null;
+ this.cgi = new openils.CGI();
+ this.staff = null;
+ this.workstation = null;
+ this.authtoken = null;
+ this.fail_count = 0;
+
+ this.patron = null;
+ this.patronBarcodeRegex = null;
+
+ this.checkouts = [];
+ this.itemsOut = [];
+ this.holdsArray = [];
+
+ // During renewals, keep track of the ID of the previous circulation.
+ // Previous circ is used for tracking failed renewals (for receipts).
+ this.prevCirc = null;
+
+ // current item barcode
+ this.itemBarcode = null;
+
+ // are we currently performing a renewal?
+ this.isRenewal = false;
+
+ // dict of org unit settings for "here"
+ this.orgSettings = {};
+
+ setTimeout(function() {location.href = return_url;}, 5000);
+}
+
+//TODO: Remove
function checkLogin() {
- if(selfCheckMgr.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) {
- switchTo('step2');
- try{dojo.byId('patron-login-password').focus();}catch(e){}
- } else {
- selfCheckMgr.loginPatron(dojo.byId('patron-login-username').value);
- }
+ if(selfCheckMgr.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) {
+ try {
+ dojo.byId('patron-login-password').focus();
+ }catch(e) {}
+ } else {
+ selfCheckMgr.loginPatron(dojo.byId('patron-login-username').value);
+ }
}
function cancelLogin() {
SelfCheckManager.fail_count = 0;
- dojo.byId('oils-selfck-status-div').innerHTML = '';
- dojo.byId('oils-selfck-status-div2').innerHTML = '';
- dojo.byId('oils-selfck-status-div3').innerHTML = '';
- dojo.byId('patron-login-password').value = '';
- openils.Util.hide('back_to_login');
- switchTo('step1');
- try {
- dojo.byId('patron-login-username').focus();
- dojo.byId('patron-login-username').select();
- } catch(e) {}
+ dojo.byId('oils-selfck-status-div').innerHTML = '';
+ dojo.byId('oils-selfck-status-div2').innerHTML = '';
+ dojo.byId('oils-selfck-status-div3').innerHTML = '';
+ dojo.byId('patron-login-password').value = '';
+ switchTo('step1');
+ try {
+ dojo.byId('patron-login-username').focus();
+ dojo.byId('patron-login-username').select();
+ } catch(e) {}
}
/**
function() {
selfCheckManager = new SelfCheckManager();
selfCheckManager.init();
- openils.Util.registerEnterHandler(dojo.byId('patron-login-username'), function(){checkLogin();});
- openils.Util.registerEnterHandler(dojo.byId('patron-login-password'), function(){selfCheckMgr.loginPatron(dojo.byId('patron-login-username').value,dojo.byId('patron-login-password').value);});
+ openils.Util.registerEnterHandler(dojo.byId('patron-login-username'),
+ function(){checkLogin();});
+ openils.Util.registerEnterHandler(
+ dojo.byId('patron-login-password'),
+ function(){
+ selfCheckMgr.loginPatron(
+ dojo.byId('patron-login-username').value,dojo.byId('patron-login-password').value
+ );
+ }
+ );
}
);
+/**
+ * Toogle stylesheet - intended for high contrast mode toggling.
+ */
+function swapStyleSheet(sheet1, sheet2) {
+ var currentStyle = document.getElementById('style');
+ if(currentStyle.getAttribute('href') != sheet1) {
+ currentStyle.setAttribute('href', sheet1);
+ } else {
+ currentStyle.setAttribute('href', sheet2);
+ }
+}
\ No newline at end of file