Owen Leonard
1977cadf96
With these patches, jQuery versions in the OPAC and staff interface are both updated to 3.6.0. The latest version of jQuery Migrate is installed to allow us to take a slower approach to updating out-of-date syntax. To test, apply the patch and try as many pages as you can, paying attention to the browser console to watch for errors. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
59 lines
2 KiB
Text
59 lines
2 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Spine labels › Tools › Koha</title>
|
|
[% INCLUDE 'doc-head-close.inc' popup => 1 %]
|
|
[% Asset.css("css/spinelabel.css") | $raw %]
|
|
<style>
|
|
@media print {
|
|
.noprint { display: none; }
|
|
}
|
|
</style>
|
|
[% IF ( IntranetUserCSS ) %]<style>[% IntranetUserCSS | $raw %]</style>[% END %]
|
|
</head>
|
|
|
|
[% IF ( BarcodeNotFound ) %]
|
|
<body id="labels_spinelabel-print" class="tools labels">
|
|
<div class="dialog message">The barcode [% Barcode | html %] was not found.</div>
|
|
<div id="print_button" class="noprint">
|
|
<button class="btn btn-default close-window">Close</button>
|
|
</div>
|
|
[% ELSE %]
|
|
<body id="labels_spinelabel-print" class="tools labels">
|
|
<div id="spinelabel">
|
|
[% content | $raw %]
|
|
</div>
|
|
<div id="print_button" class="noprint">
|
|
<button class="btn btn-default print-label"><i class="fa fa-print"></i> Print this label</button>
|
|
<button class="btn btn-default edit-label"><i class="fa fa-lock"></i> Edit this label</button>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% Asset.js( "lib/jquery/jquery-3.6.0.min.js" ) | $raw %]
|
|
[% Asset.js( "lib/jquery/jquery-migrate-3.3.2.min.js" ) | $raw %]
|
|
[% IF ( autoprint ) %]
|
|
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
|
[% END %]
|
|
<script>
|
|
$(document).ready(function(){
|
|
$(".print-label").on("click", function(e){
|
|
e.preventDefault();
|
|
window.print();
|
|
window.close();
|
|
});
|
|
|
|
$(".close-window").on("click", function(e){
|
|
e.preventDefault();
|
|
window.close();
|
|
});
|
|
$('.edit-label').click( function() {
|
|
$('#spinelabel').attr('contenteditable', function(index, attr){
|
|
return attr == 'true' ? null : 'true';
|
|
});
|
|
$('.edit-label .fa').toggleClass('fa-lock').toggleClass('fa-unlock');
|
|
});
|
|
});
|
|
</script>
|
|
|
|
[% INCLUDE 'popup-bottom.inc' %]
|