[open-ils-commits] r10340 - in trunk/Open-ILS/web/opac:
locale/en-US skin/default/js skin/default/xml/myopac
theme/default/css
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 11 16:49:21 EDT 2008
Author: erickson
Date: 2008-08-11 16:49:21 -0400 (Mon, 11 Aug 2008)
New Revision: 10340
Modified:
trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
trunk/Open-ILS/web/opac/skin/default/js/myopac.js
trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml
trunk/Open-ILS/web/opac/theme/default/css/colors.css
Log:
display expire date on myopac hold list. if hold expire is less than the expire alert interval, style the expire date
Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2008-08-11 19:30:50 UTC (rev 10339)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2008-08-11 20:49:21 UTC (rev 10340)
@@ -223,7 +223,7 @@
<!ENTITY opac.holds.freeze "Suspend this hold">
<!ENTITY opac.holds.freeze.help "A suspended hold will retain its place in the queue, but will not be fulfilled until it has been activated.">
<!ENTITY opac.holds.freeze.thaw_date "Automatically activate hold on:">
-<!ENTITY opac.holds.expire_time "Hold expiration date">
+<!ENTITY opac.holds.expire_time "Expiration date">
<!-- =================================================================
MyOPAC Preferences Page
Modified: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2008-08-11 19:30:50 UTC (rev 10339)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2008-08-11 20:49:21 UTC (rev 10340)
@@ -358,11 +358,23 @@
$n(row, 'myopac_holds_selected_chkbx').checked = false;
+ var 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'})));
+
unHideMe(row);
- myOPACDrawHoldTitle(h);
- myOPACDrawHoldStatus(h);
- }
+ var interval = fetchOrgSettingDefault(G.user.home_ou(), 'circ.hold_expire_alert_interval');
+ if(interval) {
+ secs = interval_to_seconds(interval) * 1000;
+ var diff = exp_date.getTime() - new Date().getTime();
+ if(diff < secs)
+ addCSSClass($n(row, 'myopac_hold_expire_time'), 'hold_expire_warning');
+ }
+
+ myOPACDrawHoldTitle(h);
+ myOPACDrawHoldStatus(h);
+ }
}
function myOPACEditHold(holdid) {
Modified: trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml 2008-08-11 19:30:50 UTC (rev 10339)
+++ trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml 2008-08-11 20:49:21 UTC (rev 10340)
@@ -47,6 +47,7 @@
<td>&common.status;</td>
<td>&myopac.holds.unfrozen;</td>
<td>&myopac.holds.frozen.until;</td>
+ <td>&opac.holds.expire_time;</td>
<td width='15%'>&common.select;
(<a id='myopac_select_all_holds' onclick='myopacSelectAllHolds();'
class='classic_link' href='javascript:void(0);'>&common.all;</a>/<a id='myopac_select_none_holds'
@@ -96,7 +97,9 @@
<span name='myopac_hold_unfrozen_true' class='hide_me check_mark'>&common.yes;</span>
</td>
+
<td name='myopac_holds_frozen_until'></td>
+ <td name='myopac_hold_expire_time'></td>
<td><input type='checkbox' name='myopac_holds_selected_chkbx'/></td>
<td name='myopac_holds_cancel' style='border-left: 3px solid #E0E0E0; border-right: 3px solid #E0E0E0;'>
Modified: trunk/Open-ILS/web/opac/theme/default/css/colors.css
===================================================================
--- trunk/Open-ILS/web/opac/theme/default/css/colors.css 2008-08-11 19:30:50 UTC (rev 10339)
+++ trunk/Open-ILS/web/opac/theme/default/css/colors.css 2008-08-11 20:49:21 UTC (rev 10340)
@@ -96,3 +96,6 @@
#myopac_holds_thaw_date_form { border: 1px solid #E0E0E0; }
.invalid_field { border: 3px solid red; }
+
+.hold_expire_warning { color:red; }
+
More information about the open-ils-commits
mailing list