updated default estimated hold wait display to handle seconds instead of days returne...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Jul 2010 14:06:35 +0000 (14:06 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Jul 2010 14:06:35 +0000 (14:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16978 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/myopac.js

index db04a34..f47852e 100644 (file)
@@ -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'));
     }