[open-ils-commits] r7785 - in trunk/Open-ILS/web/opac: locale/en-US
skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 14 11:57:29 EDT 2007
Author: erickson
Date: 2007-09-14 11:49:22 -0400 (Fri, 14 Sep 2007)
New Revision: 7785
Modified:
trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
trunk/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
not allowing freezing if the hold has already been captured
Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2007-09-14 15:39:04 UTC (rev 7784)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2007-09-14 15:49:22 UTC (rev 7785)
@@ -210,11 +210,12 @@
<!ENTITY myopac.holds.processing "Processing holds... This may take a moment.">
<!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.freeze.confirm 'Are you sure you wish to freeze the selected holds?
+Note that if an item has already been selected to fulfill the hold, it will not be frozen'>
<!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.">
+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 15:39:04 UTC (rev 7784)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2007-09-14 15:49:22 UTC (rev 7785)
@@ -6,6 +6,7 @@
var fleshedUser = null;
var fleshedContainers = {};
var holdCache = {};
+var holdStatusCache = {};
function clearNodes( node, keepArray ) {
@@ -397,6 +398,8 @@
var hold = r.hold;
var status = r.getResultObject();
+ holdStatusCache[hold.id()] = status;
+
var row = $("myopac_holds_row_" + r.hold.id());
if( status < 3 )
@@ -1355,6 +1358,7 @@
var holds = [];
for(var i = 0; i < selectedRows.length; i++) {
hold = holdCache[myopacHoldIDFromRow(selectedRows[i])];
+ var status = holdStatusCache[hold.id()];
switch(action) {
case 'cancel':
holds.push(hold);
@@ -1365,7 +1369,7 @@
holds.push(hold);
break;
case 'freeze':
- if(!isTrue(hold.frozen()))
+ if(!isTrue(hold.frozen()) && status < 3)
holds.push(hold);
break;
}
@@ -1441,6 +1445,7 @@
if(++myopacProcessedHolds >= myopacTotalHoldsToProcess) {
myopacHideHoldProcessing();
holdCache = {};
+ holdStatusCache = {};
myopacForceHoldsRedraw = true;
myOPACShowHolds();
}
More information about the open-ils-commits
mailing list