[open-ils-commits] r16978 - trunk/Open-ILS/web/opac/skin/default/js (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 19 10:06:37 EDT 2010
Author: erickson
Date: 2010-07-19 10:06:35 -0400 (Mon, 19 Jul 2010)
New Revision: 16978
Modified:
trunk/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
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
Modified: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2010-07-19 14:06:34 UTC (rev 16977)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2010-07-19 14:06:35 UTC (rev 16978)
@@ -450,8 +450,11 @@
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'));
}
More information about the open-ils-commits
mailing list