|
Lines 251-260
Link Here
|
| 251 |
[% IF ( OpacHoldNotes ) %] |
251 |
[% IF ( OpacHoldNotes ) %] |
| 252 |
<li> |
252 |
<li> |
| 253 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
253 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
| 254 |
<label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label> |
254 |
<label for="holdnotes_[% bibitemloo.biblionumber %]">Hold notes:</label> |
| 255 |
<span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span> |
255 |
[% IF bibitemloo.reqholdnotes %] |
| 256 |
<textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea> |
256 |
<span id="reqholdnotes_[% bibitemloo.biblionumber %]">Please enter additional information about the requested item:</span> |
| 257 |
<input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/> |
257 |
[% END %] |
|
|
258 |
<textarea id="holdnotes_[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]" >[% bibitemloo.holdnotes %]</textarea> |
| 258 |
</div> |
259 |
</div> |
| 259 |
</li> |
260 |
</li> |
| 260 |
[% END # / IF OpacHoldNotes %] |
261 |
[% END # / IF OpacHoldNotes %] |
|
Lines 406-415
Link Here
|
| 406 |
<script type="text/javascript"> |
407 |
<script type="text/javascript"> |
| 407 |
// <![CDATA[ |
408 |
// <![CDATA[ |
| 408 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
409 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
| 409 |
var ForceHoldNotesReasons=new Array( |
|
|
| 410 |
_("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific item information may be helpful."), |
| 411 |
"*** Add a new reason above this line ***" ); |
| 412 |
// NOTE: Do not renumber reasons; this will affect use of existing ones. |
| 413 |
|
410 |
|
| 414 |
// Clear the contents of an input field |
411 |
// Clear the contents of an input field |
| 415 |
$(".clearfield").on("click",function(e){ |
412 |
$(".clearfield").on("click",function(e){ |
|
Lines 469-485
Link Here
|
| 469 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
466 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
| 470 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
467 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
| 471 |
[% END %] |
468 |
[% END %] |
|
|
469 |
[% IF bibitemloo.reqholdnotes %] |
| 470 |
$("#holdnotes_[% bibitemloo.biblionumber %]").attr( 'required', true ); |
| 471 |
[% END %] |
| 472 |
[% END %] |
472 |
[% END %] |
| 473 |
|
473 |
|
| 474 |
// Insert reasons for forced hold notes |
|
|
| 475 |
$(".forcenotesreason").each(function(){ |
| 476 |
biblioNum = suffixOf($(this).attr("id"), "_"); |
| 477 |
var j=$("#notesmandatory_"+biblioNum).val(); |
| 478 |
if(j>0) { |
| 479 |
$(this).html(ForceHoldNotesReasons[j-1]); |
| 480 |
} |
| 481 |
}); |
| 482 |
|
| 483 |
$(".date-format").each(function(){ |
474 |
$(".date-format").each(function(){ |
| 484 |
if($(this).hasClass("to")){ var op = "to"; } |
475 |
if($(this).hasClass("to")){ var op = "to"; } |
| 485 |
if($(this).hasClass("from")){ var op = "from"; } |
476 |
if($(this).hasClass("from")){ var op = "from"; } |
|
Lines 589-599
Link Here
|
| 589 |
biblionumbers += biblioNum + "/"; |
580 |
biblionumbers += biblioNum + "/"; |
| 590 |
selections += biblioNum + "/"; |
581 |
selections += biblioNum + "/"; |
| 591 |
|
582 |
|
|
|
583 |
// If required hold note is empty, make it visible |
| 584 |
if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) { |
| 585 |
if( !$("#hold-options-"+biblioNum).is(':visible')) { |
| 586 |
$("#toggle-hold-options-"+biblioNum).click(); |
| 587 |
} |
| 588 |
} |
| 589 |
|
| 592 |
// If the 'specific copy' radio button is checked |
590 |
// If the 'specific copy' radio button is checked |
| 593 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
591 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
| 594 |
// Find the selected copy |
592 |
// Find the selected copy |
| 595 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
593 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
| 596 |
if ($(item).size() == 0) { |
594 |
if ($(item).size() == 0) { |
|
|
595 |
alert(MSG_NO_ITEM_SELECTED); |
| 597 |
badBib = biblioNum; |
596 |
badBib = biblioNum; |
| 598 |
return false; |
597 |
return false; |
| 599 |
} else { |
598 |
} else { |
|
Lines 611-618
Link Here
|
| 611 |
return true; |
610 |
return true; |
| 612 |
}); |
611 |
}); |
| 613 |
|
612 |
|
| 614 |
if (badBib) { |
613 |
if (badBib) { // alert has been raised already |
| 615 |
alert(MSG_NO_ITEM_SELECTED); |
|
|
| 616 |
return false; |
614 |
return false; |
| 617 |
} |
615 |
} |
| 618 |
|
616 |
|