|
Lines 268-277
Link Here
|
| 268 |
[% IF ( OpacHoldNotes ) %] |
268 |
[% IF ( OpacHoldNotes ) %] |
| 269 |
<li> |
269 |
<li> |
| 270 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
270 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
| 271 |
<label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label> |
271 |
<label for="holdnotes_[% bibitemloo.biblionumber %]">Hold notes:</label> |
| 272 |
<span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span> |
272 |
[% IF bibitemloo.reqholdnotes %] |
| 273 |
<textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea> |
273 |
<span id="reqholdnotes_[% bibitemloo.biblionumber %]">Please enter additional information about the requested item:</span> |
| 274 |
<input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/> |
274 |
[% END %] |
|
|
275 |
<textarea id="holdnotes_[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]" >[% bibitemloo.holdnotes %]</textarea> |
| 275 |
</div> |
276 |
</div> |
| 276 |
</li> |
277 |
</li> |
| 277 |
[% END # / IF OpacHoldNotes %] |
278 |
[% END # / IF OpacHoldNotes %] |
|
Lines 423-432
Link Here
|
| 423 |
<script type="text/javascript"> |
424 |
<script type="text/javascript"> |
| 424 |
// <![CDATA[ |
425 |
// <![CDATA[ |
| 425 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
426 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
| 426 |
var ForceHoldNotesReasons=new Array( |
|
|
| 427 |
_("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific item information may be helpful."), |
| 428 |
"*** Add a new reason above this line ***" ); |
| 429 |
// NOTE: Do not renumber reasons; this will affect use of existing ones. |
| 430 |
|
427 |
|
| 431 |
// Clear the contents of an input field |
428 |
// Clear the contents of an input field |
| 432 |
$(".clearfield").on("click",function(e){ |
429 |
$(".clearfield").on("click",function(e){ |
|
Lines 486-502
Link Here
|
| 486 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
483 |
$("#reqspecific_[% bibitemloo.biblionumber %]").click(); |
| 487 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
484 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
| 488 |
[% END %] |
485 |
[% END %] |
|
|
486 |
[% IF bibitemloo.reqholdnotes %] |
| 487 |
$("#holdnotes_[% bibitemloo.biblionumber %]").attr( 'required', true ); |
| 488 |
[% END %] |
| 489 |
[% END %] |
489 |
[% END %] |
| 490 |
|
490 |
|
| 491 |
// Insert reasons for forced hold notes |
|
|
| 492 |
$(".forcenotesreason").each(function(){ |
| 493 |
biblioNum = suffixOf($(this).attr("id"), "_"); |
| 494 |
var j=$("#notesmandatory_"+biblioNum).val(); |
| 495 |
if(j>0) { |
| 496 |
$(this).html(ForceHoldNotesReasons[j-1]); |
| 497 |
} |
| 498 |
}); |
| 499 |
|
| 500 |
$(".date-format").each(function(){ |
491 |
$(".date-format").each(function(){ |
| 501 |
if($(this).hasClass("to")){ var op = "to"; } |
492 |
if($(this).hasClass("to")){ var op = "to"; } |
| 502 |
if($(this).hasClass("from")){ var op = "from"; } |
493 |
if($(this).hasClass("from")){ var op = "from"; } |
|
Lines 606-616
Link Here
|
| 606 |
biblionumbers += biblioNum + "/"; |
597 |
biblionumbers += biblioNum + "/"; |
| 607 |
selections += biblioNum + "/"; |
598 |
selections += biblioNum + "/"; |
| 608 |
|
599 |
|
|
|
600 |
// If required hold note is empty, make it visible |
| 601 |
if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) { |
| 602 |
if( !$("#hold-options-"+biblioNum).is(':visible')) { |
| 603 |
$("#toggle-hold-options-"+biblioNum).click(); |
| 604 |
} |
| 605 |
} |
| 606 |
|
| 609 |
// If the 'specific copy' radio button is checked |
607 |
// If the 'specific copy' radio button is checked |
| 610 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
608 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
| 611 |
// Find the selected copy |
609 |
// Find the selected copy |
| 612 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
610 |
var item = $(".checkitem_" + biblioNum + ":checked"); |
| 613 |
if ($(item).size() == 0) { |
611 |
if ($(item).size() == 0) { |
|
|
612 |
alert(MSG_NO_ITEM_SELECTED); |
| 614 |
badBib = biblioNum; |
613 |
badBib = biblioNum; |
| 615 |
return false; |
614 |
return false; |
| 616 |
} else { |
615 |
} else { |
|
Lines 628-635
Link Here
|
| 628 |
return true; |
627 |
return true; |
| 629 |
}); |
628 |
}); |
| 630 |
|
629 |
|
| 631 |
if (badBib) { |
630 |
if (badBib) { // alert has been raised already |
| 632 |
alert(MSG_NO_ITEM_SELECTED); |
|
|
| 633 |
return false; |
631 |
return false; |
| 634 |
} |
632 |
} |
| 635 |
|
633 |
|