Migliorie minori

This commit is contained in:
Luca 2021-05-27 15:44:29 +02:00
parent 4744d15d94
commit 6889730dde
2 changed files with 30 additions and 27 deletions

View File

@ -94,9 +94,14 @@ echo '
<script>
// Lettura codici da lettore barcode
$(document).unbind("keyup");
$("#modals > div").on( "shown.bs.modal", function(){
$("#modals > div").on( "shown.bs.modal", function(){';
if (setting('Attiva scorciatoie da tastiera')) {
echo 'EnableHotkeys()';
}
echo '
$("#barcode").focus();
});
$(document).on("keyup", function (event) {
if ($(":focus").is("input, textarea")) {
return;
@ -241,15 +246,14 @@ echo '
$("#barcode").focus();
}
}
</script>';
if (setting('Attiva scorciatoie da tastiera')) {
echo '
<script>
hotkeys("f8,f9,f10", function(event, handler) {
function EnableHotkeys(){
hotkeys("f7,f8,f9,f10", function(event, handler) {
switch (handler.key) {
case "f7":
event.preventDefault();
$("#barcode").focus();
break;
case "f8":
event.preventDefault();
input("causale").set("1");
@ -264,11 +268,10 @@ hotkeys("f8,f9,f10", function(event, handler) {
break;
default: alert(event);
}
});
}
</script>';
}
echo '
<div class="hidden" id="info-articolo">

View File

@ -21,7 +21,7 @@
"font-awesome": "^4.7.0",
"fullcalendar": "^3.4.0",
"geocomplete": "^1.7.0",
"hotkeys-js": "^3.7.3",
"hotkeys-js": "^3.8.5",
"inputmask": "^3.3.9",
"jquery": "^3.5.1",
"jquery-form": "^4.2.1",