1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-23 13:58:25 +01:00

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,34 +246,32 @@ echo '
$("#barcode").focus();
}
}
</script>';
if (setting('Attiva scorciatoie da tastiera')) {
echo '
<script>
hotkeys("f8,f9,f10", function(event, handler) {
switch (handler.key) {
case "f8":
event.preventDefault();
input("causale").set("1");
break;
case "f9":
event.preventDefault();
input("causale").set("2");
break;
case "f10":
event.preventDefault();
input("causale").set("3");
break;
default: alert(event);
}
});
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");
break;
case "f9":
event.preventDefault();
input("causale").set("2");
break;
case "f10":
event.preventDefault();
input("causale").set("3");
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",