From: senator Date: Tue, 1 Jun 2010 17:38:21 +0000 (+0000) Subject: Remove accidentally committed OPAC CC payment test code. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8e9bd0b7ac2c9ce65848290aec3ea749aaee243c;p=evergreen%2Fbjwebb.git Remove accidentally committed OPAC CC payment test code. Only the changes in payment.js and selfcheck.js were supposed to be commited in 16542. The opac changes themselves were only a rough test and aren't seaworthy. git-svn-id: svn://svn.open-ils.org/ILS/trunk@16545 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index 42cdb1ae4..db04a34a2 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -10,7 +10,6 @@ var holdStatusCache = {}; var allowPendingAddr = false; var myopacEnableRefWorks = false; var myopacRefWorksHost = 'http://www.refworks.com'; -var paymentForm = new PaymentForm(); function clearNodes( node, keepArray ) { @@ -568,52 +567,13 @@ function _myOPACShowFines(r) { balance = _finesFormatNumber(summary.balance_owed()); var req = new Request(FETCH_TRANSACTIONS, G.user.session, G.user.id() ); - req.callback(function(r) { myOPACShowTransactions(r, balance); }); + req.callback(myOPACShowTransactions); req.send(); } $('myopac_fines_summary_total').appendChild(text(total)); $('myopac_fines_summary_paid').appendChild(text(paid)); - $("myopac_fines_summary_balance").appendChild(text(balance)); - -} - -function preparePaymentForm(balance, transactions) { - if (Number(balance) > 0) { - var cxl_link = $("myopac_fines_payment_cancel_link"); - var pay_link = $("myopac_fines_payment_link"); - - cxl_link.onclick = function() { - hideMe(cxl_link); - unHideMe(pay_link); - unHideMe($("myopac_circ_trans_div")); - $("myopac_payment_div").innerHTML = ""; - }; - pay_link.onclick = function() { - dojo.xhrGet({ - "url": "/eg/circ/selfcheck/payment", - "load": function(resp) { - hideMe($("myopac_circ_trans_div")); - $("myopac_payment_div").innerHTML = resp; - dojo.parser.parse($("myopac_payment_div")); - paymentForm.drawPayFinesPage( - G.user, balance, dojo.map( - transactions, function(t) { - return [t.id(), Number(t.balance_owed()).toFixed(2)]; - } - ), - function() { alert("Payment registered"); /* LFW XXX */ } - ); - hideMe(pay_link); - unHideMe(cxl_link); - }, - "error": function(e) { - alert("Error preparing payment form: " + e); // XXX i18n; user-friendliness - } - }); - }; - unHideMe($("myopac_fines_payment")); - } + $('myopac_fines_summary_balance').appendChild(text(balance)); } function _finesFormatNumber(num) { @@ -640,12 +600,11 @@ function _trimSeconds(time) { return d.iso8601Format('YMDHM',null,true,true); } -function myOPACShowTransactions(r, balance) { +function myOPACShowTransactions(r) { if(myopacGenericTransTemplate || myopacCircTransTemplate) return; var transactions = r.getResultObject(); - var payment_xacts = []; for( var idx in transactions ) { @@ -659,16 +618,12 @@ function myOPACShowTransactions(r, balance) { else if(trans.xact_type() == 'grocery' ) myopacShowGenericTransaction( trans ); - payment_xacts.push(trans); - /* XXX need to copy circulation output function here else if(trans.xact_type() == 'reservation' ) myopacShowReservationTransaction( trans ); */ } - - preparePaymentForm(balance, payment_xacts); } var myopacGenericTransTemplate; diff --git a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml index b6f4f5582..fa2011612 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml @@ -57,20 +57,15 @@ - - + diff --git a/Open-ILS/web/opac/skin/default/xml/myopac/myopac_fines.xml b/Open-ILS/web/opac/skin/default/xml/myopac/myopac_fines.xml index 8f99c5aa5..db129c016 100644 --- a/Open-ILS/web/opac/skin/default/xml/myopac/myopac_fines.xml +++ b/Open-ILS/web/opac/skin/default/xml/myopac/myopac_fines.xml @@ -17,14 +17,7 @@ &common.currency; &common.currency; - - &common.currency; -   - [ Pay this online - Cancel payment ] - - + &common.currency; @@ -37,7 +30,6 @@ --> -