thecore_dataentry_commons 1.2.17 → 1.2.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/rails_admin/main/_kp.html.erb +13 -6
- data/lib/thecore_dataentry_commons/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6a6d24066232d13b01cc781a5612a33c64ea3e6
|
4
|
+
data.tar.gz: '09cad34e4cde3408ac24921fb31d07c3641a14b7'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a5720dc3f768ad7c6a7320a5271b0d3b4f10b923856b8ea7ecfa4a6fbaf630622724fe556f7b3ebc8e8f757a86e8827ea291fd6c29b8595c450377940dd4039
|
7
|
+
data.tar.gz: ba51b13ee8e8fa9fede52260ef9d045537e13fb4eb11e431c66793e2579bb4c570d3165e145049a5c2bdb3767b19acb460a5c1cd31349e3526ec3b9db0e73161
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// then "click" the send button
|
5
5
|
event.stopPropagation();
|
6
6
|
var keycode = (event.keyCode ? event.keyCode : event.which);
|
7
|
-
//console.log(keycode);
|
7
|
+
// console.log(keycode);
|
8
8
|
if (keycode == '13') {
|
9
9
|
$("#send").click();
|
10
10
|
return true;
|
@@ -13,7 +13,7 @@
|
|
13
13
|
}
|
14
14
|
var kpMode = "<%= Settings.datawedge_kp_mode %>";
|
15
15
|
// var clickedBtn; var code; Gestisco il keypress sull'input
|
16
|
-
$("
|
16
|
+
// $("#barcode").on(kpMode, keypressAndReturn);
|
17
17
|
|
18
18
|
function resetCurrentBtn() {
|
19
19
|
$("#send").button('reset');
|
@@ -23,22 +23,30 @@
|
|
23
23
|
}
|
24
24
|
// var clickedBtn; var code; Gestisco il keypress sull'input
|
25
25
|
function manageScannedKeystrokes(event) {
|
26
|
+
// console.log(event);
|
27
|
+
event.stopPropagation();
|
26
28
|
if(!keypressAndReturn(event)) {
|
27
|
-
$("#send").focus();
|
29
|
+
// $("#send").focus();
|
28
30
|
// Scrivilo nell'input field (accumulando)
|
29
|
-
|
30
|
-
|
31
|
+
// Only if target.id is different from "barcode"
|
32
|
+
// Otherwise well get duplicate keystrokes
|
33
|
+
if(event.target.id != "barcode")
|
34
|
+
$("#barcode").val(function (index, val) {
|
35
|
+
// Write
|
31
36
|
return val + event.key;
|
32
37
|
});
|
33
38
|
}
|
34
39
|
}
|
35
40
|
function enableKSCapture(){
|
36
41
|
$(document).on(kpMode, manageScannedKeystrokes);
|
42
|
+
$("#barcode").off(kpMode, manageScannedKeystrokes);
|
37
43
|
}
|
38
44
|
function disableKSCapture(){
|
39
45
|
$(document).off(kpMode, manageScannedKeystrokes);
|
46
|
+
$("#barcode").on(kpMode, manageScannedKeystrokes);
|
40
47
|
}
|
41
48
|
|
49
|
+
// $("#send").focus();
|
42
50
|
// Init
|
43
51
|
enableKSCapture();
|
44
52
|
// Se $("#barcode") si becca il focus, elimino il keypress
|
@@ -50,5 +58,4 @@
|
|
50
58
|
// Blocco il keypress del document
|
51
59
|
enableKSCapture();
|
52
60
|
});
|
53
|
-
$("#send").focus();
|
54
61
|
</script>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_dataentry_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_settings
|