|
Lines 411-416
Link Here
|
| 411 |
var copiesRowId = null; |
411 |
var copiesRowId = null; |
| 412 |
var wasSpecific = false; |
412 |
var wasSpecific = false; |
| 413 |
var lastCopiesRowId = null; |
413 |
var lastCopiesRowId = null; |
|
|
414 |
|
| 415 |
$(".toggle-hold-options").show(); |
| 416 |
$(".hold-options").hide(); |
| 417 |
$(".holddatefrom,.holddateto").prop("readOnly", true); |
| 418 |
|
| 414 |
$(".checkitem").parent().click(function(e){ |
419 |
$(".checkitem").parent().click(function(e){ |
| 415 |
if(e.target.tagName.toLowerCase() == 'td'){ |
420 |
if(e.target.tagName.toLowerCase() == 'td'){ |
| 416 |
$(this).find("input.checkitem").each( function() { |
421 |
$(this).find("input.checkitem").each( function() { |
|
Lines 429-440
Link Here
|
| 429 |
} |
434 |
} |
| 430 |
}); |
435 |
}); |
| 431 |
|
436 |
|
|
|
437 |
$(".toggle-hold-options").on("click",function(e){ |
| 438 |
e.preventDefault(); |
| 439 |
toggleLink = $(this); |
| 440 |
var optionsID = this.id.replace("toggle-hold-options-",""); |
| 441 |
$("#hold-options-"+optionsID).toggle(0, function() { |
| 442 |
toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options")); |
| 443 |
}); |
| 444 |
}); |
| 445 |
|
| 432 |
// Hides all 'specific copy' table rows on load. |
446 |
// Hides all 'specific copy' table rows on load. |
| 433 |
$(".copiesrow").hide(); |
447 |
$(".copiesrow").hide(); |
| 434 |
|
448 |
|
| 435 |
[% FOREACH bibitemloo IN bibitemloop %] |
449 |
[% IF OPACItemHolds == 'force' %] |
| 436 |
[% IF bibitemloo.holdable %] |
450 |
[% FOREACH bibitemloo IN bibitemloop %] |
| 437 |
[% IF OPACItemHolds == 'force' %] |
451 |
[% IF bibitemloo.holdable %] |
|
|
452 |
$("#toggle-hold-options-[% bibitemloo.biblionumber %]").click(); |
| 438 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
453 |
$("#copiesrow_[% bibitemloo.biblionumber %]").show(); |
| 439 |
[% END %] |
454 |
[% END %] |
| 440 |
[% END %] |
455 |
[% END %] |
|
Lines 449-458
Link Here
|
| 449 |
} |
464 |
} |
| 450 |
}); |
465 |
}); |
| 451 |
|
466 |
|
| 452 |
$(".toggle-hold-options").show(); |
|
|
| 453 |
$(".hold-options").hide(); |
| 454 |
$(".holddatefrom,.holddateto").prop("readOnly", true); |
| 455 |
|
| 456 |
$(".date-format").each(function(){ |
467 |
$(".date-format").each(function(){ |
| 457 |
if($(this).hasClass("to")){ var op = "to"; } |
468 |
if($(this).hasClass("to")){ var op = "to"; } |
| 458 |
if($(this).hasClass("from")){ var op = "from"; } |
469 |
if($(this).hasClass("from")){ var op = "from"; } |
|
Lines 504-511
Link Here
|
| 504 |
$(".selectany").attr("checked", "checked"); |
515 |
$(".selectany").attr("checked", "checked"); |
| 505 |
[% END %] |
516 |
[% END %] |
| 506 |
|
517 |
|
| 507 |
// If we can choose a specific item, we preselect the first one |
518 |
// If the user is *allowed* to choose a specific item |
| 508 |
[% IF OPACItemHolds =="1" or OPACItemHolds == 'force' %] |
519 |
// The first one is preselected |
|
|
520 |
[% IF OPACItemHolds =="1" %] |
| 509 |
$("table.copiesrow").each(function(){ |
521 |
$("table.copiesrow").each(function(){ |
| 510 |
var id = suffixOf($(this).attr("id"), "_"); |
522 |
var id = suffixOf($(this).attr("id"), "_"); |
| 511 |
select_first_available(id); |
523 |
select_first_available(id); |
|
Lines 591-605
Link Here
|
| 591 |
return true; |
603 |
return true; |
| 592 |
}); |
604 |
}); |
| 593 |
|
605 |
|
| 594 |
$(".toggle-hold-options").on("click",function(e){ |
|
|
| 595 |
e.preventDefault(); |
| 596 |
toggleLink = $(this); |
| 597 |
var optionsID = this.id.replace("toggle-hold-options-",""); |
| 598 |
$("#hold-options-"+optionsID).toggle(0, function() { |
| 599 |
toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options")); |
| 600 |
}); |
| 601 |
}); |
| 602 |
|
| 603 |
[% FOREACH bibitemloo IN bibitemloop %] |
606 |
[% FOREACH bibitemloo IN bibitemloop %] |
| 604 |
[% IF ( bibitemloo.holdable ) %] |
607 |
[% IF ( bibitemloo.holdable ) %] |
| 605 |
// http://jqueryui.com/demos/datepicker/#date-range |
608 |
// http://jqueryui.com/demos/datepicker/#date-range |
| 606 |
- |
|
|