[open-ils-commits] r15112 - in trunk/Open-ILS/web: js/ui/default/circ/selfcheck templates/default/circ/selfcheck (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 8 17:06:25 EST 2009
Author: erickson
Date: 2009-12-08 17:06:19 -0500 (Tue, 08 Dec 2009)
New Revision: 15112
Added:
trunk/Open-ILS/web/templates/default/circ/selfcheck/fines.tt2
Modified:
trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
trunk/Open-ILS/web/templates/default/circ/selfcheck/main.tt2
trunk/Open-ILS/web/templates/default/circ/selfcheck/summary.tt2
Log:
plugged in initial fines list interface
Modified: trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js 2009-12-08 21:46:50 UTC (rev 15111)
+++ trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js 2009-12-08 22:06:19 UTC (rev 15112)
@@ -227,7 +227,7 @@
} else {
this.handleAlert('', false, 'login-success');
- dojo.byId('oils-selfck-user-banner').innerHTML = 'Welcome, ' + this.patron.usrname(); // TODO i18n
+ dojo.byId('oils-selfck-user-banner').innerHTML = 'Welcome, ' + this.patron.first_given_name(); // TODO i18n
this.drawCircPage();
}
}
@@ -594,7 +594,53 @@
}
+SelfCheckManager.prototype.drawFinesPage = function() {
+ // TODO add option to hid scanBox
+ // this.updateScanBox(...)
+
+ this.goToTab('fines');
+ progressDialog.show(true);
+
+ 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]);
+
+ var self = this;
+ var handler = function(dataList) {
+ for(var i in dataList) {
+ var data = dataList[i];
+ var row = self.finesTemplate.cloneNode(true);
+ var type = data.transaction.xact_type();
+ if(type == 'circulation') {
+ self.byName(row, 'type').innerHTML = type;
+ self.byName(row, 'details').innerHTML = data.record.title();
+ } else if(type == 'grocery') {
+ self.byName(row, 'type').innerHTML = 'Miscellaneous'; // Go ahead and head off any confusion around "grocery". TODO i18n
+ self.byName(row, 'details').innerHTML = data.transaction.last_billing_type();
+ }
+ 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.finesTbody.appendChild(row);
+ }
+ }
+
+ fieldmapper.standardRequest(
+ ['open-ils.actor', 'open-ils.actor.user.transactions.have_balance.fleshed'],
+ { async : true,
+ params : [this.authtoken, this.patron.id()],
+ oncomplete : function(r) {
+ progressDialog.hide();
+ handler(openils.Util.readResponse(r));
+ }
+ }
+ );
+}
+
+
/**
* Check out a single item. If the item is already checked
* out to the patron, redirect to renew()
@@ -859,13 +905,6 @@
}
-SelfCheckManager.prototype.drawFinesPage = function() {
- openils.Util.hide('oils-selfck-circ-page');
- openils.Util.hide('oils-selfck-holds-page');
- openils.Util.show('oils-selfck-payment-page');
-}
-
-
SelfCheckManager.prototype.initPrinter = function() {
try { // Mozilla only
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
Added: trunk/Open-ILS/web/templates/default/circ/selfcheck/fines.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/circ/selfcheck/fines.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/circ/selfcheck/fines.tt2 2009-12-08 22:06:19 UTC (rev 15112)
@@ -0,0 +1,22 @@
+<div id='oils-selfck-fines-table-div'>
+ <table id='oils-selfck-fines-table' class='oils-selfck-item-table'>
+ <thead>
+ <tr>
+ <td>Type</td>
+ <td>Details</td>
+ <td>Total Owed</td>
+ <td>Total Paid</td>
+ <td>Balance Owed</td>
+ </tr>
+ </thead>
+ <tbody id='oils-selfck-fines-tbody'>
+ <tr id='oils-selfck-fines-row'>
+ <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>
+ </table>
+</div>
Modified: trunk/Open-ILS/web/templates/default/circ/selfcheck/main.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/circ/selfcheck/main.tt2 2009-12-08 21:46:50 UTC (rev 15111)
+++ trunk/Open-ILS/web/templates/default/circ/selfcheck/main.tt2 2009-12-08 22:06:19 UTC (rev 15112)
@@ -13,7 +13,7 @@
<a id='oils-selfck-print-list-link' href='javascript:void(0);'>Print List</a>
</div>
<div id='oils-selfck-circ-page' class='hidden'>
- <!-- Checkout / renewal interface -->
+ <!-- Checkout / renewal and items out interface -->
[% INCLUDE 'default/circ/selfcheck/circ_page.tt2' %]
</div>
<div id='oils-selfck-holds-page' class='hidden'>
@@ -21,7 +21,8 @@
[% INCLUDE 'default/circ/selfcheck/holds_page.tt2' %]
</div>
<div id='oils-selfck-payment-page' class='hidden'>
- <!-- Credit Card payments interface -->
+ <!-- Fines and credit card payments interface -->
+ [% INCLUDE 'default/circ/selfcheck/fines.tt2' %]
</div>
</div>
<div id='oils-selfck-summary-div'>
Modified: trunk/Open-ILS/web/templates/default/circ/selfcheck/summary.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/circ/selfcheck/summary.tt2 2009-12-08 21:46:50 UTC (rev 15111)
+++ trunk/Open-ILS/web/templates/default/circ/selfcheck/summary.tt2 2009-12-08 22:06:19 UTC (rev 15112)
@@ -19,7 +19,7 @@
<fieldset>
<legend>Fines</legend>
<div id='oils-selfck-fines-total'></div>
- <div class='hidden'><a href='javascript:void(0);' id='oils-selfck-pay-fines-link'>Pay fines</a></div>
+ <div><a href='javascript:void(0);' id='oils-selfck-pay-fines-link'>View Fines</a></div>
</fieldset>
</div>
More information about the open-ils-commits
mailing list