From: Thomas Berezansky Date: Tue, 17 Jan 2012 16:13:15 +0000 (-0500) Subject: Don't show estimated wait for negative estimates X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c939a54bf867d7de5b8236610115f85ed4159608;p=evergreen%2Fequinox.git Don't show estimated wait for negative estimates JSPac code was just checking for the truth of the estimated_wait return, but the estimated_wait return can be -1 under some circumstances. Signed-off-by: Thomas Berezansky Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index 3ea4b02e32..925997ab20 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -461,7 +461,8 @@ function myOShowHoldStatus(r) { var row = $("myopac_holds_row_" + r.hold.id()); - if(qstats.estimated_wait || myopacShowHoldEstimate) { + // A note: estimated_wait may be -1 under some circumstances where it shouldn't be shown. + if((qstats.estimated_wait && qstats.estimated_wait > 0) || myopacShowHoldEstimate) { myopacShowHoldEstimate = true; if(qstats.estimated_wait) { // wait is currently returned in seconds, but displayed in days