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