[open-ils-commits] r13000 - trunk/Open-ILS/web/opac/skin/default/js (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 27 15:52:10 EDT 2009
Author: erickson
Date: 2009-04-27 15:52:06 -0400 (Mon, 27 Apr 2009)
New Revision: 13000
Modified:
trunk/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
forward-porting 12847 (hold expire date warning bug), which was missed before
Modified: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2009-04-27 19:48:39 UTC (rev 12999)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2009-04-27 19:52:06 UTC (rev 13000)
@@ -358,8 +358,9 @@
$n(row, 'myopac_holds_selected_chkbx').checked = false;
+ var exp_date;
if(h.expire_time()) {
- var exp_date = dojo.date.stamp.fromISOString(h.expire_time());
+ exp_date = dojo.date.stamp.fromISOString(h.expire_time());
$n(row, 'myopac_hold_expire_time').appendChild(
text(dojo.date.locale.format(exp_date, {selector:'date'})));
}
@@ -367,7 +368,7 @@
unHideMe(row);
var interval = fetchOrgSettingDefault(G.user.home_ou(), 'circ.hold_expire_alert_interval');
- if(interval) {
+ if(interval && exp_date) {
secs = interval_to_seconds(interval) * 1000;
var diff = exp_date.getTime() - new Date().getTime();
if(diff < secs)
More information about the open-ils-commits
mailing list