Lines 32-37
function select_first_available(id){
Link Here
|
32 |
var copiesRowId = null; |
32 |
var copiesRowId = null; |
33 |
var wasSpecific = false; |
33 |
var wasSpecific = false; |
34 |
var lastCopiesRowId = null; |
34 |
var lastCopiesRowId = null; |
|
|
35 |
|
36 |
$(".toggle-hold-options").show(); |
37 |
$(".hold-options").hide(); |
38 |
$(".holddatefrom,.holddateto").prop("readOnly", true); |
39 |
|
35 |
$(".checkitem").parent().click(function(e){ |
40 |
$(".checkitem").parent().click(function(e){ |
36 |
if(e.target.tagName.toLowerCase() == 'td'){ |
41 |
if(e.target.tagName.toLowerCase() == 'td'){ |
37 |
$(this).find("input.checkitem").each( function() { |
42 |
$(this).find("input.checkitem").each( function() { |
Lines 50-55
function select_first_available(id){
Link Here
|
50 |
} |
55 |
} |
51 |
}); |
56 |
}); |
52 |
|
57 |
|
|
|
58 |
$(".toggle-hold-options").on("click",function(e){ |
59 |
e.preventDefault(); |
60 |
toggleLink = $(this); |
61 |
var optionsID = this.id.replace("toggle-hold-options-",""); |
62 |
$("#hold-options-"+optionsID).toggle(0, function() { |
63 |
toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options")); |
64 |
}); |
65 |
}); |
66 |
|
53 |
// Hides all 'specific copy' table rows on load. |
67 |
// Hides all 'specific copy' table rows on load. |
54 |
$(".copiesrow").hide(); |
68 |
$(".copiesrow").hide(); |
55 |
|
69 |
|
Lines 62-71
function select_first_available(id){
Link Here
|
62 |
} |
76 |
} |
63 |
}); |
77 |
}); |
64 |
|
78 |
|
65 |
$(".toggle-hold-options").show(); |
|
|
66 |
$(".hold-options").hide(); |
67 |
$(".holddatefrom,.holddateto").prop("readOnly", true); |
68 |
|
69 |
$(".date-format").each(function(){ |
79 |
$(".date-format").each(function(){ |
70 |
if($(this).hasClass("to")){ var op = "to"; } |
80 |
if($(this).hasClass("to")){ var op = "to"; } |
71 |
if($(this).hasClass("from")){ var op = "from"; } |
81 |
if($(this).hasClass("from")){ var op = "from"; } |
Lines 118-125
function select_first_available(id){
Link Here
|
118 |
$(".selectany").attr("checked", "checked"); |
128 |
$(".selectany").attr("checked", "checked"); |
119 |
[% END %] |
129 |
[% END %] |
120 |
|
130 |
|
121 |
// If we can choose a specific item, we preselect the first one |
131 |
// If the user is *allowed* to choose a specific item |
122 |
[% IF OPACItemHolds =="1" or OPACItemHolds == 'force' %] |
132 |
// The first one is preselected |
|
|
133 |
[% IF OPACItemHolds =="1" %] |
123 |
$("table.copiesrow").each(function(){ |
134 |
$("table.copiesrow").each(function(){ |
124 |
var id = suffixOf($(this).attr("id"), "_"); |
135 |
var id = suffixOf($(this).attr("id"), "_"); |
125 |
select_first_available(id); |
136 |
select_first_available(id); |
Lines 203-219
function select_first_available(id){
Link Here
|
203 |
$("#biblionumbers").val(biblionumbers); |
214 |
$("#biblionumbers").val(biblionumbers); |
204 |
return true; |
215 |
return true; |
205 |
}); |
216 |
}); |
206 |
$(".toggle-hold-options").on("click",function(e){ |
|
|
207 |
e.preventDefault(); |
208 |
toggleLink = $(this); |
209 |
var optionsID = this.id.replace("toggle-hold-options-",""); |
210 |
$("#hold-options-"+optionsID).toggle(0, function() { |
211 |
toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options")); |
212 |
}); |
213 |
}); |
214 |
|
215 |
|
216 |
|
217 |
|
217 |
|
218 |
|
218 |
|
219 |
[% FOREACH bibitemloo IN bibitemloop %] |
219 |
[% FOREACH bibitemloo IN bibitemloop %] |
Lines 489-494
function select_first_available(id){
Link Here
|
489 |
[% IF OPACItemHolds == 'force' %] |
489 |
[% IF OPACItemHolds == 'force' %] |
490 |
<script type="text/javascript"> |
490 |
<script type="text/javascript"> |
491 |
$(document).ready(function() { |
491 |
$(document).ready(function() { |
|
|
492 |
$("#toggle-hold-options-[% bibitemloo.biblionumber %]").click(); |
492 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
493 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
493 |
}); |
494 |
}); |
494 |
</script> |
495 |
</script> |
495 |
- |
|
|