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=7bb8330f3924181234761829d15f365fc9dfc90a;p=Evergreen.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 dee883ae12..992b7ea354 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