[open-ils-commits] r12847 - branches/rel_1_4/Open-ILS/web/opac/skin/default/js (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 10 13:54:37 EDT 2009
Author: erickson
Date: 2009-04-10 13:54:33 -0400 (Fri, 10 Apr 2009)
New Revision: 12847
Modified:
branches/rel_1_4/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
don't try to pre-alert for expired holds if the hold doesn't even expire
Modified: branches/rel_1_4/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- branches/rel_1_4/Open-ILS/web/opac/skin/default/js/myopac.js 2009-04-10 15:18:40 UTC (rev 12846)
+++ branches/rel_1_4/Open-ILS/web/opac/skin/default/js/myopac.js 2009-04-10 17:54:33 UTC (rev 12847)
@@ -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