[open-ils-commits] r7772 - 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
Wed Sep 12 18:04:41 EDT 2007
Author: erickson
Date: 2007-09-12 17:56:48 -0400 (Wed, 12 Sep 2007)
New Revision: 7772
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/js/myopac.js
trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml
Log:
plugged in hold freezing and thaw date logic. changed display to show a green check for un-paused holds (to indicate active-ness)
Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2007-09-12 20:11:05 UTC (rev 7771)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2007-09-12 21:56:48 UTC (rev 7772)
@@ -229,7 +229,7 @@
<!ENTITY myopac.prefs.help "This setting defines how you will be notified of holds that are ready to be picked up from the library.
By default, holds will use the notification style you choose here.
However, you will still have the option to change individual holds regardless of this setting.">
-<!ENTITY myopac.holds.frozen "Frozen">
+<!ENTITY myopac.holds.unfrozen "Un-Frozen">
<!ENTITY myopac.holds.frozen.until "Frozen Until">
<!-- =================================================================
Modified: trunk/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/holds.js 2007-09-12 20:11:05 UTC (rev 7771)
+++ trunk/Open-ILS/web/opac/skin/default/js/holds.js 2007-09-12 21:56:48 UTC (rev 7772)
@@ -91,12 +91,19 @@
var status = holdArgs.status;
var orgsel = $('holds_org_selector');
+ var frozenbox = $('holds_frozen_chkbox');
+
setSelector(orgsel, hold.pickup_lib());
- if( hold.capture_time() || status > 2 )
+ if( hold.capture_time() || status > 2 ) {
orgsel.disabled = true;
- else
+ frozenbox.disabled = true;
+ $('holds_frozen_thaw_input').disabled = true;
+
+ } else {
orgsel.disabled = false;
+ frozenbox.disabled = false;
+ }
$('holds_submit').onclick = holdsEditHold;
@@ -117,6 +124,21 @@
} else {
$('holds_enable_email').checked = false;
}
+
+ /* populate the hold freezing info */
+ if(!frozenbox.disabled && isTrue(hold.frozen())) {
+ frozenbox.checked = true;
+ unHideMe($('hold_frozen_thaw_row'));
+ if(hold.thaw_date()) {
+ $('holds_frozen_thaw_input').value = hold.thaw_date();
+ } else {
+ $('holds_frozen_thaw_input').value = '';
+ }
+ } else {
+ frozenbox.checked = false;
+ $('holds_frozen_thaw_input').value = '';
+ hideMe($('hold_frozen_thaw_row'));
+ }
}
function holdsEditHold() {
@@ -672,6 +694,17 @@
hold.target(target);
hold.hold_type(holdArgs.type);
+ // see if this hold should be frozen and for how long
+ if($('holds_frozen_chkbox').checked) {
+ hold.frozen('t');
+ unHideMe($('hold_frozen_thaw_row'));
+ thawDate = $('holds_frozen_thaw_input').value;
+ if(thawDate)
+ hold.thaw_date(thawDate);
+ else
+ hold.thaw_date(null);
+ }
+
//check for alternate hold formats
var fstring = holdsSetSelectedFormats();
if(fstring) {
Modified: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2007-09-12 20:11:05 UTC (rev 7771)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js 2007-09-12 21:56:48 UTC (rev 7772)
@@ -337,6 +337,18 @@
$n(row,'myopac_holds_edit_link').setAttribute(
'href','javascript:myOPACEditHold("'+ h.id()+'");');
+ if(isTrue(h.frozen())) {
+ hideMe($n(row, 'myopac_hold_unfrozen_true'))
+ unHideMe($n(row, 'myopac_hold_unfrozen_false'))
+ if(h.thaw_date()) {
+ var d = Date.parseIso8601(h.thaw_date());
+ $n(row, 'myopac_holds_frozen_until').appendChild(text(d.iso8601Format('YMD')));
+ }
+ } else {
+ unHideMe($n(row, 'myopac_hold_unfrozen_true'))
+ hideMe($n(row, 'myopac_hold_unfrozen_false'))
+ }
+
unHideMe(row);
myOPACDrawHoldTitle(h);
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-12 20:11:05 UTC (rev 7771)
+++ trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml 2007-09-12 21:56:48 UTC (rev 7772)
@@ -12,7 +12,7 @@
<td>&myopac.holds.formats;</td>
<td>&myopac.holds.location;</td>
<td>&common.status;</td>
- <td>&myopac.holds.frozen;</td>
+ <td>&myopac.holds.unfrozen;</td>
<td>&myopac.holds.frozen.until;</td>
<td>&myopac.holds.edit.cancel;</td>
</tr>
@@ -49,8 +49,8 @@
</td>
<td>
- <span name='myopac_hold_frozen_false' class='x_mark'>✗</span>
- <span name='myopac_hold_frozen_true' class='hide_me check_mark'>✓</span>
+ <span name='myopac_hold_unfrozen_false' class='x_mark'>✗</span>
+ <span name='myopac_hold_unfrozen_true' class='hide_me check_mark'>✓</span>
</td>
<td name='myopac_holds_frozen_until'></td>
More information about the open-ils-commits
mailing list