[open-ils-commits] r10339 - in trunk/Open-ILS/web/opac:
locale/en-US skin/default/js skin/default/xml/common
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 11 15:30:53 EDT 2008
Author: erickson
Date: 2008-08-11 15:30:50 -0400 (Mon, 11 Aug 2008)
New Revision: 10339
Modified:
trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
trunk/Open-ILS/web/opac/skin/default/js/holds.js
trunk/Open-ILS/web/opac/skin/default/xml/common/holds.xml
Log:
show default expiration date in hold editor and allow for expire date editing. pass a JS date to the dijit datebox setValue call
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:29:33 UTC (rev 10338)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2008-08-11 19:30:50 UTC (rev 10339)
@@ -223,6 +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">
<!-- =================================================================
MyOPAC Preferences Page
Modified: trunk/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/holds.js 2008-08-11 19:29:33 UTC (rev 10338)
+++ trunk/Open-ILS/web/opac/skin/default/js/holds.js 2008-08-11 19:30:50 UTC (rev 10339)
@@ -143,12 +143,14 @@
$('holds_enable_email').checked = false;
}
+ dijit.byId('holds_expire_time').setValue(dojo.date.stamp.fromISOString(hold.expire_time()));
+
/* populate the hold freezing info */
if(!frozenbox.disabled && isTrue(hold.frozen())) {
frozenbox.checked = true;
unHideMe($('hold_frozen_thaw_row'));
if(hold.thaw_date()) {
- dijit.byId('holds_frozen_thaw_input').setValue(hold.thaw_date());
+ dijit.byId('holds_frozen_thaw_input').setValue(dojo.date.stamp.fromISOString(hold.thaw_date()));
} else {
dijit.byId('holds_frozen_thaw_input').setValue('');
}
@@ -451,7 +453,6 @@
}
}
- //if(!G.user.email()) {
if(!holdArgs.recipient.email()) {
$('holds_enable_email').checked = false;
$('holds_enable_email').disabled = true;
@@ -479,6 +480,13 @@
$('holds_frozen_chkbox').checked = false;
hideMe($('hold_frozen_thaw_row'));
+ var interval = fetchOrgSettingDefault(holdArgs.recipient.home_ou(), 'circ.hold_expire_interval');
+ var secs = 0;
+ if(interval)
+ secs = interval_to_seconds(interval);
+ var expire = new Date();
+ expire.setTime(expire.getTime() + Number(secs + '000'));
+ dijit.byId('holds_expire_time').setValue(expire);
}
function holdsParseMRFormats(str) {
@@ -717,6 +725,13 @@
hold.target(target);
hold.hold_type(holdArgs.type);
+ var expireDate = dojo.date.stamp.toISOString(dijit.byId('holds_expire_time').getValue())
+ expireDate = holdsVerifyThawDate(expireDate);
+ if(expireDate)
+ hold.expire_time(expireDate);
+ else
+ return;
+
// see if this hold should be frozen and for how long
if($('holds_frozen_chkbox').checked) {
hold.frozen('t');
Modified: trunk/Open-ILS/web/opac/skin/default/xml/common/holds.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/common/holds.xml 2008-08-11 19:29:33 UTC (rev 10338)
+++ trunk/Open-ILS/web/opac/skin/default/xml/common/holds.xml 2008-08-11 19:30:50 UTC (rev 10339)
@@ -119,6 +119,13 @@
</td>
</tr>
+ <tr>
+ <td class='holds_cell'>&opac.holds.expire_time;</td>
+ <td class='holds_cell'>
+ <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10' id='holds_expire_time' />
+ </td>
+ </tr>
+
<tr>
<td class='holds_cell'>
&opac.holds.freeze;
More information about the open-ils-commits
mailing list