Lines 283-292
Link Here
|
283 |
[% END # / UNLESS singleBranchMode %] |
283 |
[% END # / UNLESS singleBranchMode %] |
284 |
</ul> |
284 |
</ul> |
285 |
|
285 |
|
286 |
[% IF pickup_delays %] |
|
|
287 |
<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> |
288 |
[% END %] |
289 |
|
290 |
<a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a> |
286 |
<a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a> |
291 |
|
287 |
|
292 |
<div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options"> |
288 |
<div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options"> |
Lines 510-529
Link Here
|
510 |
var MSG_EMPTY_START_DATE = _("Hold start date should be filled."); |
506 |
var MSG_EMPTY_START_DATE = _("Hold start date should be filled."); |
511 |
var MSG_EMPTY_END_DATE = _("Hold expiration date should be filled."); |
507 |
var MSG_EMPTY_END_DATE = _("Hold expiration date should be filled."); |
512 |
|
508 |
|
513 |
function calculate_delay_days(){ |
|
|
514 |
$(".branch > select").each(function(){ |
515 |
var selected_branch = $(this).val(); |
516 |
var branch_biblionumber = $(this).attr('id'); |
517 |
var biblionumber = branch_biblionumber.slice( branch_biblionumber.indexOf('_')+1 ); |
518 |
[% FOREACH branchcode IN pickup_delays.keys %] |
519 |
var branchcode = "[% branchcode | html %]"; |
520 |
if ( branchcode == selected_branch ) { |
521 |
$("#pickup_delay_days_" + biblionumber).text([% pickup_delays.$branchcode | html %]); |
522 |
} |
523 |
[% END %] |
524 |
}); |
525 |
} |
526 |
|
527 |
$(document).ready(function() { |
509 |
$(document).ready(function() { |
528 |
|
510 |
|
529 |
$(".toggle_unholdable").click(function(e){ |
511 |
$(".toggle_unholdable").click(function(e){ |
Lines 531-542
Link Here
|
531 |
$(this).parent('div').find(".unholdable").toggle(); |
513 |
$(this).parent('div').find(".unholdable").toggle(); |
532 |
}); |
514 |
}); |
533 |
|
515 |
|
534 |
calculate_delay_days(); |
|
|
535 |
$(".pickup_delay").show(); |
536 |
$(".branch > select").change(function(){ |
537 |
calculate_delay_days(); |
538 |
}); |
539 |
|
540 |
$("#hold-request-form").preventDoubleFormSubmit(); |
516 |
$("#hold-request-form").preventDoubleFormSubmit(); |
541 |
var copiesRowId = null; |
517 |
var copiesRowId = null; |
542 |
var wasSpecific = false; |
518 |
var wasSpecific = false; |