|
Lines 346-352
Link Here
|
| 346 |
|
346 |
|
| 347 |
[% IF bibitemloo.itemholdable %] |
347 |
[% IF bibitemloo.itemholdable %] |
| 348 |
<div id="copiesrow_[% bibitemloo.biblionumber | html %]" class="copiesrow"> |
348 |
<div id="copiesrow_[% bibitemloo.biblionumber | html %]" class="copiesrow"> |
| 349 |
<table class="table table-bordered table-striped"> |
349 |
<table class="table table-bordered table-striped itemstable"> |
| 350 |
<caption>Select a specific item:</caption> |
350 |
<caption>Select a specific item:</caption> |
| 351 |
<thead> |
351 |
<thead> |
| 352 |
<tr> |
352 |
<tr> |
|
Lines 380-386
Link Here
|
| 380 |
[% ELSE %] |
380 |
[% ELSE %] |
| 381 |
<tr class="holdable"> |
381 |
<tr class="holdable"> |
| 382 |
[% END %] |
382 |
[% END %] |
| 383 |
<td class="copynumber"> |
383 |
<td class="copynumber" data-order="[% itemLoo.copynumber | html %]"> |
| 384 |
<input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" /> |
384 |
<input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" /> |
| 385 |
[% ELSE %] |
385 |
[% ELSE %] |
| 386 |
[% SET unholdable_items = 1 %] |
386 |
[% SET unholdable_items = 1 %] |
|
Lines 495-515
Link Here
|
| 495 |
[% INCLUDE 'opac-bottom.inc' %] |
495 |
[% INCLUDE 'opac-bottom.inc' %] |
| 496 |
[% BLOCK jsinclude %] |
496 |
[% BLOCK jsinclude %] |
| 497 |
[% INCLUDE 'calendar.inc' %] |
497 |
[% INCLUDE 'calendar.inc' %] |
|
|
498 |
[% INCLUDE 'datatables.inc' %] |
| 498 |
<script> |
499 |
<script> |
| 499 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
500 |
var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); |
| 500 |
|
501 |
|
| 501 |
// Clear the contents of an input field |
|
|
| 502 |
$(".clearfield").on("click",function(e){ |
| 503 |
$(this).closest("td").find("input").val(""); |
| 504 |
e.preventDefault(); |
| 505 |
}); |
| 506 |
|
| 507 |
// Select the first item available |
| 508 |
function select_first_available(id){ |
| 509 |
var radios = $("input:radio[name='checkitem_" + id + "']"); |
| 510 |
$(radios).first().attr("checked", "checked"); |
| 511 |
} |
| 512 |
|
| 513 |
$(document).ready(function() { |
502 |
$(document).ready(function() { |
| 514 |
|
503 |
|
| 515 |
$(".toggle_unholdable").click(function(e){ |
504 |
$(".toggle_unholdable").click(function(e){ |
|
Lines 602-613
Link Here
|
| 602 |
// onload, selectany is checked |
591 |
// onload, selectany is checked |
| 603 |
$(".selectany").attr("checked", "checked"); |
592 |
$(".selectany").attr("checked", "checked"); |
| 604 |
|
593 |
|
| 605 |
// If the user is *allowed* to choose a specific item |
|
|
| 606 |
// The first one is preselected |
| 607 |
$(".copiesrow table").each(function(){ |
| 608 |
var id = suffixOf($(this).closest('div').attr("id"), "_"); |
| 609 |
select_first_available(id); |
| 610 |
}); |
| 611 |
|
594 |
|
| 612 |
// On confirmsjs change |
595 |
// On confirmsjs change |
| 613 |
$(".confirmjs").change(function(){ |
596 |
$(".confirmjs").change(function(){ |
|
Lines 701-707
Link Here
|
| 701 |
|
684 |
|
| 702 |
return true; |
685 |
return true; |
| 703 |
}); |
686 |
}); |
| 704 |
|
687 |
$(".itemstable").each(function(){ |
|
|
688 |
$(this).DataTable({ |
| 689 |
dom: "t", |
| 690 |
initComplete: function() { |
| 691 |
this.find("input:radio").first().prop("checked", true ); |
| 692 |
} |
| 693 |
}); |
| 694 |
}); |
| 705 |
}); |
695 |
}); |
| 706 |
</script> |
696 |
</script> |
| 707 |
[% END %] |
697 |
[% END %] |
| 708 |
- |
|
|