|
Lines 577-583
Link Here
|
| 577 |
[% END %] |
577 |
[% END %] |
| 578 |
[% INCLUDE 'datatables.inc' %] |
578 |
[% INCLUDE 'datatables.inc' %] |
| 579 |
<script> |
579 |
<script> |
| 580 |
[% IF ( loggedinusername ) %] |
580 |
const loggedinusername = [% ( loggedinusername ) ? 1 : 0 | html %]; |
|
|
581 |
</script> |
| 582 |
|
| 583 |
[% IF ( loggedinusername ) %] |
| 584 |
<script> |
| 581 |
function enableCheckboxActions(){ |
585 |
function enableCheckboxActions(){ |
| 582 |
// Enable/disable controls if checkboxes are checked |
586 |
// Enable/disable controls if checkboxes are checked |
| 583 |
var checkedBoxes = $(".cb:checked"); |
587 |
var checkedBoxes = $(".cb:checked"); |
|
Lines 589-597
Link Here
|
| 589 |
$(".selections-toolbar .links a").addClass("disabled"); |
593 |
$(".selections-toolbar .links a").addClass("disabled"); |
| 590 |
} |
594 |
} |
| 591 |
} |
595 |
} |
| 592 |
[% END %] |
596 |
</script> |
|
|
597 |
[% END %] |
| 593 |
|
598 |
|
| 594 |
[% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %] |
599 |
[% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %] |
|
|
600 |
<script> |
| 595 |
$(function() { |
601 |
$(function() { |
| 596 |
$('#isbn').autofill({ |
602 |
$('#isbn').autofill({ |
| 597 |
'volumeInfo.title': {target: 'title', effect: 'flash'}, |
603 |
'volumeInfo.title': {target: 'title', effect: 'flash'}, |
|
Lines 603-615
Link Here
|
| 603 |
'kind': {target: 'itemtype', handle: function(t,v) { t.val('BK'); },}, |
609 |
'kind': {target: 'itemtype', handle: function(t,v) { t.val('BK'); },}, |
| 604 |
}); |
610 |
}); |
| 605 |
}); |
611 |
}); |
| 606 |
[% END %] |
612 |
</script> |
|
|
613 |
[% END %] |
| 607 |
|
614 |
|
|
|
615 |
<script> |
| 608 |
$(function() { |
616 |
$(function() { |
| 609 |
$("#suggestt").kohaTable({ |
617 |
$("#suggestt").kohaTable({ |
| 610 |
order: [[ 1, "asc" ]], |
618 |
order: [[ 1, "asc" ]], |
| 611 |
columnDefs: [ |
619 |
columnDefs: [ |
| 612 |
[% IF ( loggedinusername ) %]{ targets: [ 0 ], orderable: false, searchable: false }[% END %], |
620 |
...( loggedinusername |
|
|
621 |
? [{ targets: [ 0 ], orderable: false, searchable: false }] |
| 622 |
: [] |
| 623 |
), |
| 613 |
{ className: 'dtr-control', orderable: false, targets: -1 }, |
624 |
{ className: 'dtr-control', orderable: false, targets: -1 }, |
| 614 |
{ responsivePriority: 1, targets: 1 } |
625 |
{ responsivePriority: 1, targets: 1 } |
| 615 |
], |
626 |
], |
|
Lines 620-626
Link Here
|
| 620 |
} |
631 |
} |
| 621 |
}, |
632 |
}, |
| 622 |
}); |
633 |
}); |
| 623 |
[% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>"); |
634 |
if (loggedinusername){ |
|
|
635 |
$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>"); |
| 624 |
$("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>"); |
636 |
$("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>"); |
| 625 |
$("#CheckAll").on("click",function(e){ |
637 |
$("#CheckAll").on("click",function(e){ |
| 626 |
e.preventDefault(); |
638 |
e.preventDefault(); |
|
Lines 672-678
Link Here
|
| 672 |
}); |
684 |
}); |
| 673 |
} |
685 |
} |
| 674 |
}); |
686 |
}); |
| 675 |
[% END %] |
687 |
} |
| 676 |
}); |
688 |
}); |
| 677 |
</script> |
689 |
</script> |
| 678 |
[% END %] |
690 |
[% END %] |
| 679 |
- |
|
|