Lines 416-421
Link Here
|
416 |
var copiesRowId = null; |
416 |
var copiesRowId = null; |
417 |
var wasSpecific = false; |
417 |
var wasSpecific = false; |
418 |
var lastCopiesRowId = null; |
418 |
var lastCopiesRowId = null; |
|
|
419 |
|
420 |
$(".toggle-hold-options").show(); |
421 |
$(".hold-options").hide(); |
422 |
$(".holddatefrom,.holddateto").prop("readOnly", true); |
423 |
|
419 |
$(".checkitem").parent().click(function(e){ |
424 |
$(".checkitem").parent().click(function(e){ |
420 |
if(e.target.tagName.toLowerCase() == 'td'){ |
425 |
if(e.target.tagName.toLowerCase() == 'td'){ |
421 |
$(this).find("input.checkitem").each( function() { |
426 |
$(this).find("input.checkitem").each( function() { |
Lines 434-445
Link Here
|
434 |
} |
439 |
} |
435 |
}); |
440 |
}); |
436 |
|
441 |
|
|
|
442 |
$(".toggle-hold-options").on("click",function(e){ |
443 |
e.preventDefault(); |
444 |
toggleLink = $(this); |
445 |
var optionsID = this.id.replace("toggle-hold-options-",""); |
446 |
$("#hold-options-"+optionsID).toggle(0, function() { |
447 |
toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options")); |
448 |
}); |
449 |
}); |
450 |
|
437 |
// Hides all 'specific copy' table rows on load. |
451 |
// Hides all 'specific copy' table rows on load. |
438 |
$(".copiesrow").hide(); |
452 |
$(".copiesrow").hide(); |
439 |
|
453 |
|
440 |
[% FOREACH bibitemloo IN bibitemloop %] |
454 |
[% IF OPACItemHolds == 'force' %] |
441 |
[% IF bibitemloo.holdable %] |
455 |
[% FOREACH bibitemloo IN bibitemloop %] |
442 |
[% IF OPACItemHolds == 'force' %] |
456 |
[% IF bibitemloo.holdable %] |
|
|
457 |
$("#toggle-hold-options-[% bibitemloo.biblionumber %]").click(); |
443 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
458 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
444 |
[% END %] |
459 |
[% END %] |
445 |
[% END %] |
460 |
[% END %] |
Lines 454-463
Link Here
|
454 |
} |
469 |
} |
455 |
}); |
470 |
}); |
456 |
|
471 |
|
457 |
$(".toggle-hold-options").show(); |
|
|
458 |
$(".hold-options").hide(); |
459 |
$(".holddatefrom,.holddateto").prop("readOnly", true); |
460 |
|
461 |
$(".date-format").each(function(){ |
472 |
$(".date-format").each(function(){ |
462 |
if($(this).hasClass("to")){ var op = "to"; } |
473 |
if($(this).hasClass("to")){ var op = "to"; } |
463 |
if($(this).hasClass("from")){ var op = "from"; } |
474 |
if($(this).hasClass("from")){ var op = "from"; } |
Lines 509-516
Link Here
|
509 |
$(".selectany").attr("checked", "checked"); |
520 |
$(".selectany").attr("checked", "checked"); |
510 |
[% END %] |
521 |
[% END %] |
511 |
|
522 |
|
512 |
// If we can choose a specific item, we preselect the first one |
523 |
// If the user is *allowed* to choose a specific item |
513 |
[% IF OPACItemHolds =="1" or OPACItemHolds == 'force' %] |
524 |
// The first one is preselected |
|
|
525 |
[% IF OPACItemHolds =="1" %] |
514 |
$("table.copiesrow").each(function(){ |
526 |
$("table.copiesrow").each(function(){ |
515 |
var id = suffixOf($(this).attr("id"), "_"); |
527 |
var id = suffixOf($(this).attr("id"), "_"); |
516 |
select_first_available(id); |
528 |
select_first_available(id); |
Lines 596-610
Link Here
|
596 |
return true; |
608 |
return true; |
597 |
}); |
609 |
}); |
598 |
|
610 |
|
599 |
$(".toggle-hold-options").on("click",function(e){ |
|
|
600 |
e.preventDefault(); |
601 |
toggleLink = $(this); |
602 |
var optionsID = this.id.replace("toggle-hold-options-",""); |
603 |
$("#hold-options-"+optionsID).toggle(0, function() { |
604 |
toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options")); |
605 |
}); |
606 |
}); |
607 |
|
608 |
[% FOREACH bibitemloo IN bibitemloop %] |
611 |
[% FOREACH bibitemloo IN bibitemloop %] |
609 |
[% IF ( bibitemloo.holdable ) %] |
612 |
[% IF ( bibitemloo.holdable ) %] |
610 |
// http://jqueryui.com/demos/datepicker/#date-range |
613 |
// http://jqueryui.com/demos/datepicker/#date-range |
611 |
- |
|
|