Lines 282-291
Link Here
|
282 |
[% END # / UNLESS singleBranchMode %] |
282 |
[% END # / UNLESS singleBranchMode %] |
283 |
</ul> |
283 |
</ul> |
284 |
|
284 |
|
285 |
[% IF pickup_delays %] |
|
|
286 |
<p class="pickup_delay" style="display:none;">When your item is ready for pickup, you will have <span id="pickup_delay_days_[% bibitemloo.biblionumber | html %]"></span> days to pick it up from this library.</p> |
287 |
[% END %] |
288 |
|
289 |
<a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a> |
285 |
<a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a> |
290 |
|
286 |
|
291 |
<div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options"> |
287 |
<div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options"> |
Lines 493-512
Link Here
|
493 |
var MSG_EMPTY_START_DATE = _("Hold start date should be filled."); |
489 |
var MSG_EMPTY_START_DATE = _("Hold start date should be filled."); |
494 |
var MSG_EMPTY_END_DATE = _("Hold expiration date should be filled."); |
490 |
var MSG_EMPTY_END_DATE = _("Hold expiration date should be filled."); |
495 |
|
491 |
|
496 |
function calculate_delay_days(){ |
|
|
497 |
$(".branch > select").each(function(){ |
498 |
var selected_branch = $(this).val(); |
499 |
var branch_biblionumber = $(this).attr('id'); |
500 |
var biblionumber = branch_biblionumber.slice( branch_biblionumber.indexOf('_')+1 ); |
501 |
[% FOREACH branchcode IN pickup_delays.keys %] |
502 |
var branchcode = "[% branchcode | html %]"; |
503 |
if ( branchcode == selected_branch ) { |
504 |
$("#pickup_delay_days_" + biblionumber).text([% pickup_delays.$branchcode | html %]); |
505 |
} |
506 |
[% END %] |
507 |
}); |
508 |
} |
509 |
|
510 |
$(document).ready(function() { |
492 |
$(document).ready(function() { |
511 |
|
493 |
|
512 |
$(".toggle_unholdable").click(function(e){ |
494 |
$(".toggle_unholdable").click(function(e){ |
Lines 514-525
Link Here
|
514 |
$(this).parent('div').find(".unholdable").toggle(); |
496 |
$(this).parent('div').find(".unholdable").toggle(); |
515 |
}); |
497 |
}); |
516 |
|
498 |
|
517 |
calculate_delay_days(); |
|
|
518 |
$(".pickup_delay").show(); |
519 |
$(".branch > select").change(function(){ |
520 |
calculate_delay_days(); |
521 |
}); |
522 |
|
523 |
$("#hold-request-form").preventDoubleFormSubmit(); |
499 |
$("#hold-request-form").preventDoubleFormSubmit(); |
524 |
var copiesRowId = null; |
500 |
var copiesRowId = null; |
525 |
var wasSpecific = false; |
501 |
var wasSpecific = false; |