type in remote request fixed so that EX objects are properly alerted
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Nov 2005 15:48:53 +0000 (15:48 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Nov 2005 15:48:53 +0000 (15:48 +0000)
myopac handling renewals better
result_common showing 'search other types' suggestion on low hits

git-svn-id: svn://svn.open-ils.org/ILS/trunk@2057 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/RemoteRequest.js
Open-ILS/web/opac/skin/default/js/myopac.js
Open-ILS/web/opac/skin/default/js/result_common.js

index 65b9cfd..d14c5f2 100644 (file)
@@ -178,10 +178,6 @@ RemoteRequest.prototype.send = function(blocking) {
                                'application/x-www-form-urlencoded');
        }
 
-       try {
-               dump( 'Remote Request URL: ' + url + '\n');
-       } catch(E){}
-
        try{ this.xmlhttp.send( data ); } catch(e){}
 
        this.sendCount += 1;
@@ -211,7 +207,7 @@ RemoteRequest.prototype.getResultObject = function() {
        if( obj[0] != null && obj[1] == null ) obj = obj[0];
 
        /* these are user level exceptions from the server code */
-       if(obj.__isfieldmapper && obj.classname == "ex") {
+       if(obj._isfieldmapper && obj.classname == "ex") {
                if(!isXUL()) alert(obj.err_msg());
                throw obj;
        }
index 31cbf1c..e273bfb 100644 (file)
@@ -145,11 +145,13 @@ function myOPACRenewCirc(circid) {
                if(circsCache[i].id() == circid)
                        circ = circsCache[i];
 
-       alert('renewing ' + circ.id());
        var req = new Request(RENEW_CIRC, G.user.session, circ );
        req.send(true);
        var res = req.result();
-       alert('renew result: ' + js2JSON(res));
+       if(res.status) {
+               alert(res.text);
+               return;
+       }
        alert($('myopac_renew_success').innerHTML);     
        checkedDrawn = false;
        myOPACShowChecked();
index d8052a3..b5095cd 100644 (file)
@@ -78,6 +78,8 @@ function resultLowHits() {
                $('low_hits_remove_format_link').setAttribute('href',buildOPACLink(a));
                unHideMe($('low_hits_remove_format'));
        }
+
+       resultSuggestSearchClass();
 }
 
 var lowHitsXRefLink;
@@ -110,7 +112,6 @@ function resultLowHitXRef(r) {
 function resultZeroHits() {
        unHideMe($('result_zero_hits_msg'));
        resultExpandSearch();
-       resultSuggestSearchClass();
 }
 
 function resultExpandSearch() {