[open-ils-commits] r9180 - trunk/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 1 13:00:26 EDT 2008
Author: erickson
Date: 2008-04-01 12:24:16 -0400 (Tue, 01 Apr 2008)
New Revision: 9180
Modified:
trunk/Open-ILS/web/opac/skin/default/js/holds.js
trunk/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
little more fine tuning of the thaw date handling; fixed post-create edit bug for thaw dates
Modified: trunk/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/holds.js 2008-04-01 16:22:01 UTC (rev 9179)
+++ trunk/Open-ILS/web/opac/skin/default/js/holds.js 2008-04-01 16:24:16 UTC (rev 9180)
@@ -717,13 +717,17 @@
unHideMe($('hold_frozen_thaw_row'));
thawDate = $('holds_frozen_thaw_input').value;
if(thawDate) {
- if(holdsVerifyThawDate(thawDate))
+ thawDate = holdsVerifyThawDate(thawDate);
+ if(thawDate)
hold.thaw_date(thawDate);
else
return;
} else {
hold.thaw_date(null);
}
+ } else {
+ hold.frozen('f');
+ hold.thaw_date(null);
}
//check for alternate hold formats
@@ -830,9 +834,9 @@
/* verify that the thaw date is valid and after today */
function holdsVerifyThawDate(dateString) {
- if(Date.parseIso8601(dateString) &&
- holdGreaterThanToday(dateString))
- return dateString;
+ thawDate = Date.parseIso8601(dateString);
+ if(thawDate && holdGreaterThanToday(dateString))
+ return thawDate.iso8601Format('YMD', false, false, true);
return null;
}
Modified: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2008-04-01 16:22:01 UTC (rev 9179)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2008-04-01 16:24:16 UTC (rev 9180)
@@ -1442,11 +1442,12 @@
function myopacApplyThawDate() {
var dateString = $('myopac_holds_thaw_date_input').value;
- if(dateString)
+ if(dateString) {
dateString = holdsVerifyThawDate(dateString);
if(!dateString) return;
- else
+ } else {
dateString = null;
+ }
myopacProcessHolds('freeze', dateString);
}
More information about the open-ils-commits
mailing list