Remove accidentally committed OPAC CC payment test code.
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Jun 2010 17:38:21 +0000 (17:38 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Jun 2010 17:38:21 +0000 (17:38 +0000)
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

Open-ILS/web/opac/skin/default/js/myopac.js
Open-ILS/web/opac/skin/default/xml/common/js_common.xml
Open-ILS/web/opac/skin/default/xml/myopac/myopac_fines.xml

index 42cdb1a..db04a34 100644 (file)
@@ -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;
index b6f4f55..fa20116 100644 (file)
 
        <script type="text/javascript" src='/js/dojo/dojo/dojo.js'></script>
        <script type="text/javascript" src='/js/dojo/dojo/openils_dojo.js'></script>
-       <script type="text/javascript" src='/js/dojo/opensrf/opensrf.js'></script>
-       <script type="text/javascript" src="/js/ui/default/circ/selfcheck/payment.js"></script>
+    <script type="text/javascript" src='/js/dojo/opensrf/opensrf.js'></script>
 
        <script language="javascript" type="text/javascript">
                dojo.addOnLoad(init);
                dojo.require("dijit._Calendar");
                dojo.require("dijit.form.DateTextBox");
-               dojo.require("dijit.form.NumberSpinner");
-               dojo.require("dijit.form.CheckBox");
-               dojo.require("dijit.form.TextBox");
                dojo.require("dijit.form.FilteringSelect");
                dojo.require("dojo.date.locale");
                dojo.require("dojo.date.stamp");
                dojo.require("dojo.parser");
                dojo.require("openils.I18N");
-               dojo.require("openils.Util");
        </script>
index 8f99c5a..db129c0 100644 (file)
                        <tr id='myopac_fines_summary_row' class='hide_me'>
                                <td id='myopac_fines_summary_total' >&common.currency;</td>
                                <td id='myopac_fines_summary_paid' >&common.currency;</td>
-                                        <td style="color:red;font-weight: bold;">
-                                               &common.currency;<span
-                                                       id="myopac_fines_summary_balance"></span>
-                                               <span class="hide_me" id="myopac_fines_payment"> &nbsp;
-                                                       [ <a id="myopac_fines_payment_link" href="javascript:void(0);">Pay this online</a>
-                                                       <a id="myopac_fines_payment_cancel_link" href="javascript:void(0);" class="hide_me">Cancel payment</a> ]
-                                       </span>
-                               </td>
+                               <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>&common.currency;</td>
                        </tr>
                </tbody>
        </table>
@@ -37,7 +30,6 @@
        </div>
        -->
 
-       <div id="myopac_payment_div"></div>
 
        <!-- Table for circulation transactions only -->
        <div id='myopac_circ_trans_div' class='hide_me'>