|
Lines 5-13
Link Here
|
| 5 |
<script type="text/javascript"> |
5 |
<script type="text/javascript"> |
| 6 |
// <![CDATA[ |
6 |
// <![CDATA[ |
| 7 |
var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection."); |
7 |
var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection."); |
|
|
8 |
var MSG_EMPTY_MAND_NOTE = _("Please enter additional information in the hold notes that have a red asterisk."); |
| 8 |
var ForceHoldNotesReasons=new Array( |
9 |
var ForceHoldNotesReasons=new Array( |
| 9 |
_("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific copy information may be helpful."), |
10 |
_("This title consists of multiple volumes/parts. Please indicate which part you need. Looking at the specific copy information may be helpful."), // R 1 |
| 10 |
"*** Add a new reason above this line ***" ); // NOTE: Do not renumber reasons; this will affect use of existing ones. |
11 |
"This title has one item.", // R 2 (meant only for combining with R 1; no translation) |
|
|
12 |
"UNIMARC test: Title contains 'test'.", // R 3 (unimarc testing; no translation) |
| 13 |
_("This title represents a collection. Please indicate which part you need."), // R 4 (MARC21 leader: collection) |
| 14 |
"*** Add a new reason above this line ***" ); // NOTE: Do not renumber reasons; this will affect use of existing ones. Add the _() for translation! |
| 11 |
|
15 |
|
| 12 |
function prefixOf (s, tok) { |
16 |
function prefixOf (s, tok) { |
| 13 |
var index = s.indexOf(tok); |
17 |
var index = s.indexOf(tok); |
|
Lines 140-150
Link Here
|
| 140 |
|
144 |
|
| 141 |
// Find the items with the 'Hold' box checked |
145 |
// Find the items with the 'Hold' box checked |
| 142 |
var badBib = null; |
146 |
var badBib = null; |
|
|
147 |
var emptyMandNote=0; |
| 143 |
$(".confirmjs:checked").each(function() { |
148 |
$(".confirmjs:checked").each(function() { |
| 144 |
var biblioNum = $(this).val(); |
149 |
var biblioNum = $(this).val(); |
| 145 |
biblionumbers += biblioNum + "/"; |
150 |
biblionumbers += biblioNum + "/"; |
| 146 |
selections += biblioNum + "/"; |
151 |
selections += biblioNum + "/"; |
| 147 |
|
152 |
|
|
|
153 |
// Check mandatory notes |
| 154 |
if($("#notesmandatory_"+biblioNum).val()>0) { |
| 155 |
if($.trim($("#holdnotes"+biblioNum).val())==='') { |
| 156 |
emptyMandNote= biblioNum; |
| 157 |
return false; |
| 158 |
} |
| 159 |
} |
| 160 |
|
| 148 |
// If the 'specific copy' radio button is checked |
161 |
// If the 'specific copy' radio button is checked |
| 149 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
162 |
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) { |
| 150 |
// Find the selected copy |
163 |
// Find the selected copy |
|
Lines 171-176
Link Here
|
| 171 |
alert(MSG_NO_COPY_SELECTED); |
184 |
alert(MSG_NO_COPY_SELECTED); |
| 172 |
return false; |
185 |
return false; |
| 173 |
} |
186 |
} |
|
|
187 |
else if(emptyMandNote>0) { |
| 188 |
alert(MSG_EMPTY_MAND_NOTE); |
| 189 |
return false; |
| 190 |
} |
| 174 |
|
191 |
|
| 175 |
$("#selections").val(selections); |
192 |
$("#selections").val(selections); |
| 176 |
$("#biblionumbers").val(biblionumbers); |
193 |
$("#biblionumbers").val(biblionumbers); |
|
Lines 208-213
Link Here
|
| 208 |
} |
225 |
} |
| 209 |
}); |
226 |
}); |
| 210 |
[% END %] |
227 |
[% END %] |
|
|
228 |
[% IF bibitemloo.mandatorynotes %] |
| 229 |
// Show more options when hold notes are mandatory |
| 230 |
$("#toggle-hold-options-[% bibitemloo.biblionumber %]").click(); |
| 231 |
[% END %] |
| 211 |
[% END %] |
232 |
[% END %] |
| 212 |
|
233 |
|
| 213 |
}); |
234 |
}); |
|
Lines 412-419
Link Here
|
| 412 |
<li> |
433 |
<li> |
| 413 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
434 |
<div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> |
| 414 |
<label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label> |
435 |
<label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label> |
| 415 |
<span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span> |
|
|
| 416 |
<textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea> |
436 |
<textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea> |
|
|
437 |
[% IF bibitemloo.mandatorynotes %]<span style="color:red;">* </span>[% END %] |
| 438 |
<span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span> |
| 417 |
<input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/> |
439 |
<input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/> |
| 418 |
</div> |
440 |
</div> |
| 419 |
</li> |
441 |
</li> |