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 508-527
Link Here
|
508 |
var MSG_EMPTY_START_DATE = _("Hold start date should be filled."); |
504 |
var MSG_EMPTY_START_DATE = _("Hold start date should be filled."); |
509 |
var MSG_EMPTY_END_DATE = _("Hold expiration date should be filled."); |
505 |
var MSG_EMPTY_END_DATE = _("Hold expiration date should be filled."); |
510 |
|
506 |
|
511 |
function calculate_delay_days(){ |
|
|
512 |
$(".branch > select").each(function(){ |
513 |
var selected_branch = $(this).val(); |
514 |
var branch_biblionumber = $(this).attr('id'); |
515 |
var biblionumber = branch_biblionumber.slice( branch_biblionumber.indexOf('_')+1 ); |
516 |
[% FOREACH branchcode IN pickup_delays.keys %] |
517 |
var branchcode = "[% branchcode | html %]"; |
518 |
if ( branchcode == selected_branch ) { |
519 |
$("#pickup_delay_days_" + biblionumber).text([% pickup_delays.$branchcode | html %]); |
520 |
} |
521 |
[% END %] |
522 |
}); |
523 |
} |
524 |
|
525 |
$(document).ready(function() { |
507 |
$(document).ready(function() { |
526 |
|
508 |
|
527 |
$(".toggle_unholdable").click(function(e){ |
509 |
$(".toggle_unholdable").click(function(e){ |
Lines 529-540
Link Here
|
529 |
$(this).parent('div').find(".unholdable").toggle(); |
511 |
$(this).parent('div').find(".unholdable").toggle(); |
530 |
}); |
512 |
}); |
531 |
|
513 |
|
532 |
calculate_delay_days(); |
|
|
533 |
$(".pickup_delay").show(); |
534 |
$(".branch > select").change(function(){ |
535 |
calculate_delay_days(); |
536 |
}); |
537 |
|
538 |
$("#hold-request-form").preventDoubleFormSubmit(); |
514 |
$("#hold-request-form").preventDoubleFormSubmit(); |
539 |
var copiesRowId = null; |
515 |
var copiesRowId = null; |
540 |
var wasSpecific = false; |
516 |
var wasSpecific = false; |