[open-ils-commits] r7781 - in trunk/Open-ILS/web/opac: locale/en-US
skin/default/js skin/default/xml/myopac
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 14 11:30:32 EDT 2007
Author: erickson
Date: 2007-09-14 11:22:24 -0400 (Fri, 14 Sep 2007)
New Revision: 7781
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
Log:
added support for batch freezing and batch thaw-date setting
Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2007-09-14 14:56:46 UTC (rev 7780)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2007-09-14 15:22:24 UTC (rev 7781)
@@ -203,14 +203,18 @@
<!ENTITY myopac.holds.edit "Edit">
<!ENTITY myopac.holds.cancel "Cancel">
<!ENTITY myopac.holds.verify "If you wish to cancel the selected hold, click OK, otherwise click Cancel.">
-<!ENTITY myopac.holds.freeze_selected "Freeze selected holds">
-<!ENTITY myopac.holds.thaw_selected "Un-freeze selected holds">
-<!ENTITY myopac.holds.cancel_selected "Cancel selected holds">
+<!ENTITY myopac.holds.freeze_selected "Freeze">
+<!ENTITY myopac.holds.thaw_selected "Un-freeze">
+<!ENTITY myopac.holds.thaw_date_selected "Set Un-freeze date">
+<!ENTITY myopac.holds.cancel_selected "Cancel">
<!ENTITY myopac.holds.processing "Processing holds... This may take a moment.">
-<!ENTITY myopac.holds.actions 'Actions'>
+<!ENTITY myopac.holds.actions 'Actions for selected holds'>
<!ENTITY myopac.holds.cancel.confirm 'Are you sure you wish to cancel the selected holds?'>
<!ENTITY myopac.holds.freeze.confirm 'Are you sure you wish to freeze the selected holds?'>
<!ENTITY myopac.holds.thaw.confirm 'Are you sure you wish to un-freeze the selected holds?'>
+<!ENTITY myopac.holds.thaw_date.confirm 'Are you sure you wish to change the un-freeze date for the selected holds?'>
+<!ENTITY myopac.holds.freeze.select_thaw "Select an 'Un-Freeze' date. This is the date at which the holds will become active again.
+ If no date is chosen, the holds will remain frozen until they are manually un-frozen.">
<!ENTITY opac.holds.freeze "Freeze this hold">
<!ENTITY opac.holds.freeze.help "A 'frozen' will retain its place in the queue, but will not be fulfilled until it has been unfrozen.">
Modified: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2007-09-14 14:56:46 UTC (rev 7780)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2007-09-14 15:22:24 UTC (rev 7781)
@@ -1349,6 +1349,7 @@
myopacSelectNoneHolds(); /* clear the selection */
+
/* first, let's collect the holds that actually need processing and
collect the full process count while we're at it */
var holds = [];
@@ -1358,6 +1359,7 @@
case 'cancel':
holds.push(hold);
break;
+ case 'thaw_date':
case 'thaw':
if(isTrue(hold.frozen()))
holds.push(hold);
@@ -1370,6 +1372,9 @@
}
myopacTotalHoldsToProcess = holds.length;
+ var thawDate = null;
+ var thawDateSet = false;
+
/* now we process them */
for(var i = 0; i < holds.length; i++) {
@@ -1388,8 +1393,25 @@
req = new Request(UPDATE_HOLD, G.user.session, hold);
break;
+ case 'thaw_date':
+ if(!thawDateSet)
+ thawDate = prompt($('myopac.holds.freeze.select_thaw').innerHTML) || null;
+ thawDateSet = true;
+ hold.thaw_date(thawDate);
+ req = new Request(UPDATE_HOLD, G.user.session, hold);
+ break;
+
+
case 'freeze':
+ if(!thawDateSet)
+ thawDate = prompt($('myopac.holds.freeze.select_thaw').innerHTML);
+ thawDateSet = true;
+ hold.frozen('t');
+ if(thawDate)
+ hold.thaw_date(thawDate);
+ req = new Request(UPDATE_HOLD, G.user.session, hold);
break;
+
}
req.callback(myopacBatchHoldCallback);
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 2007-09-14 14:56:46 UTC (rev 7780)
+++ trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml 2007-09-14 15:22:24 UTC (rev 7781)
@@ -9,6 +9,7 @@
<option id='myopac_holds_actions_none' value=''>-- &myopac.holds.actions; --</option>
<option value='freeze'>&myopac.holds.freeze_selected;</option>
<option value='thaw'>&myopac.holds.thaw_selected;</option>
+ <option value='thaw_date'>&myopac.holds.thaw_date_selected;</option>
<option value='cancel'>&myopac.holds.cancel_selected;</option>
</select>
</td></tr></tbody>
@@ -18,6 +19,8 @@
<span id='myopac.holds.cancel.confirm' class='hide_me'>&myopac.holds.cancel.confirm;</span>
<span id='myopac.holds.freeze.confirm' class='hide_me'>&myopac.holds.freeze.confirm;</span>
<span id='myopac.holds.thaw.confirm' class='hide_me'>&myopac.holds.thaw.confirm;</span>
+ <span id='myopac.holds.thaw_date.confirm' class='hide_me'>&myopac.holds.thaw_date.confirm;</span>
+ <span id='myopac.holds.freeze.select_thaw' class='hide_me'>&myopac.holds.freeze.select_thaw;</span>
<table width='100%' id='myopac_holds_processing' class='hide_me'>
<tr><td>&myopac.holds.processing;</td></tr>
More information about the open-ils-commits
mailing list