added renewal code to myopac for circulations... needs debugging, permissions fixing...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Nov 2005 22:54:11 +0000 (22:54 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Nov 2005 22:54:11 +0000 (22:54 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2039 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/myopac.js
Open-ILS/web/opac/skin/default/xml/myopac_checked.xml

index c458d4b..2ee000a 100644 (file)
@@ -93,6 +93,7 @@ function myOPACShowChecked() {
 
 var checkedRowTemplate;
 var circsCache = new Array();
+var checkedDrawn = false;
 function myOPACDrawCheckedOut(r) {
 
 
@@ -101,8 +102,9 @@ function myOPACDrawCheckedOut(r) {
        var loading                     = $("myopac_checked_loading");
        var none                                = $("myopac_checked_none");
 
-       if(checkedRowTemplate) return;
-       checkedRowTemplate = tbody.removeChild($("myopac_checked_row"));
+       if(checkedDrawn) return;
+       if(!checkedRowTemplate) 
+               checkedRowTemplate = tbody.removeChild($("myopac_checked_row"));
 
        clearNodes( tbody, [ loading, none ] );
 
@@ -146,8 +148,11 @@ function myOPACRenewCirc(circid) {
        alert('renewing ' + circ.id());
        var req = new Request(RENEW_CIRC, G.user.session, circ );
        req.send(true);
-       req.result();
+       var res = req.result();
+       alert('renew result: ' + js2JSON(res));
        alert($('myopac_renew_success').innerHTML);     
+       checkedDrawn = false;
+       myOPACShowChecked();
 }
 
 
index 55c6a28..3a9a724 100644 (file)
@@ -37,7 +37,8 @@
                                <td align='center' name='myopac_checked_renewals' class='light_border'> </td>
 
                                <td align='center' name='myopac_checked_renew' class='light_border'>
-                                       <a href='javascript:void(0);' name='myopac_checked_renew_link'>Renew</a>
+                                       <a style='text-decoration:underline;' 
+                                               href='javascript:void(0);' name='myopac_checked_renew_link'>Renew</a>
                                </td>
 
                        </tr>