From: erickson Date: Mon, 19 Jul 2010 14:06:35 +0000 (+0000) Subject: updated default estimated hold wait display to handle seconds instead of days returne... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=975c4742341f2ddb54363c72e0e7721acd3960a6;p=evergreen%2Fbjwebb.git updated default estimated hold wait display to handle seconds instead of days returned by the ML API call. TODO, consider if/how to handle sub-day intervals git-svn-id: svn://svn.open-ils.org/ILS/trunk@16978 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index db04a34a2..f47852e9f 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -450,8 +450,11 @@ function myOShowHoldStatus(r) { if(qstats.estimated_wait || myopacShowHoldEstimate) { myopacShowHoldEstimate = true; - if(qstats.estimated_wait) - $n(row, 'myopac_holds_estimated_wait').appendChild(text(qstats.estimated_wait)); + if(qstats.estimated_wait) { + // wait is currently returned in seconds, but displayed in days + var wait = Math.ceil(qstats.estimated_wait / 86400); + $n(row, 'myopac_holds_estimated_wait').appendChild(text(wait)); + } unHideMe($('myopac_holds_estimated_wait_column')); unHideMe($n(row, 'myopac_holds_estimated_wait')); }