[open-ils-commits] r9178 -
branches/rel_1_2/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 1 12:19:07 EDT 2008
Author: erickson
Date: 2008-04-01 11:42:56 -0400 (Tue, 01 Apr 2008)
New Revision: 9178
Modified:
branches/rel_1_2/Open-ILS/web/opac/skin/default/js/holds.js
branches/rel_1_2/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
little more fine tuning of the thaw date handling
Modified: branches/rel_1_2/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/skin/default/js/holds.js 2008-04-01 15:29:45 UTC (rev 9177)
+++ branches/rel_1_2/Open-ILS/web/opac/skin/default/js/holds.js 2008-04-01 15:42:56 UTC (rev 9178)
@@ -717,7 +717,8 @@
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;
@@ -830,9 +831,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: branches/rel_1_2/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/skin/default/js/myopac.js 2008-04-01 15:29:45 UTC (rev 9177)
+++ branches/rel_1_2/Open-ILS/web/opac/skin/default/js/myopac.js 2008-04-01 15:42:56 UTC (rev 9178)
@@ -1436,11 +1436,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