From 442e6d61978ec5a14a9d947d13a491bc620a397f Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 17 Nov 2005 15:48:53 +0000 Subject: [PATCH] type in remote request fixed so that EX objects are properly alerted 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 | 6 +----- Open-ILS/web/opac/skin/default/js/myopac.js | 6 ++++-- Open-ILS/web/opac/skin/default/js/result_common.js | 3 ++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Open-ILS/web/opac/common/js/RemoteRequest.js b/Open-ILS/web/opac/common/js/RemoteRequest.js index 65b9cfd439..d14c5f22a7 100644 --- a/Open-ILS/web/opac/common/js/RemoteRequest.js +++ b/Open-ILS/web/opac/common/js/RemoteRequest.js @@ -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; } diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index 31cbf1c628..e273bfbc5f 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -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(); diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js index d8052a3885..b5095cd1aa 100644 --- a/Open-ILS/web/opac/skin/default/js/result_common.js +++ b/Open-ILS/web/opac/skin/default/js/result_common.js @@ -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() { -- 2.43.2