thecore_dataentry_commons 1.2.38 → 1.2.39

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f734122d8066520192a5116badd8141f87962db5
4
- data.tar.gz: e211e3b441eba8bf71ea70c5eb4508efde5fe11b
3
+ metadata.gz: d9600f57a53a6d1e4bda2a70b1a44903f2130ee7
4
+ data.tar.gz: d90612165955a83290c2263298cd8e18be76d0a8
5
5
  SHA512:
6
- metadata.gz: ead4fda01332f388c88c0ae68150f030e0af98ee1e2c9e1fadb9dec29af9d125d3595884e619a45a6d6f9de3b2fdf7cddf318273c14e1ad6e9f197deb53070b6
7
- data.tar.gz: c7d22ce92b91e66a3a7cee117a42abdccf6f6ebe130f21d25a8fb505ff75ce3300303e23926b1d3af6a93bcae7f78e590f248874151998c86a12e6f9f54592b6
6
+ metadata.gz: 76658ccdd9471430aa0bcf47692ee1f906d6456bdefafd77183f041f6959dbeda79d4c34fab9fb1c577895bd6a6c595f2521663c32eca18676e30c63cdb040e1
7
+ data.tar.gz: 7b72664c1368810eaecc77537e9f75aa86a2ba983cdcdc14dffb01cc04c8b8b8f6104e13f61cfe0ca71395ecd208a75b515d691698c6fdb58285280f855fef00
@@ -98,10 +98,10 @@
98
98
  parameters: additionalData
99
99
  }).then(barcodeScannedSuccess).done(barcodeScannedThen).fail(barcodeScannedFailure);
100
100
  }
101
- <%-unless (start_disabled rescue false)%>
102
- $('#send').on('click', sendFunction);
103
- <%-else%>
101
+ <%-if (start_disabled rescue false)%>
104
102
  $('#send').off('click', sendFunction);
103
+ <%-else%>
104
+ $('#send').on('click', sendFunction);
105
105
  <%-end%>
106
106
 
107
107
  <%-unless (hide_action rescue true)%>
@@ -39,12 +39,14 @@
39
39
  }
40
40
  function enableKSCapture(){
41
41
  console.log("Enabling keypress capture");
42
+ $(document).off(kpMode, manageScannedKeystrokes);
42
43
  $(document).on(kpMode, manageScannedKeystrokes);
43
44
  $("#barcode").off(kpMode, manageScannedKeystrokes);
44
45
  }
45
46
  function disableKSCapture(){
46
47
  console.log("Disabling keypress capture");
47
48
  $(document).off(kpMode, manageScannedKeystrokes);
49
+ $("#barcode").off(kpMode, manageScannedKeystrokes);
48
50
  $("#barcode").on(kpMode, manageScannedKeystrokes);
49
51
  }
50
52
 
@@ -62,9 +64,9 @@
62
64
  $("#barcode").off(kpMode);
63
65
  $("#barcode").focus();
64
66
  // Enabling keypress event only for this page
65
- <%-unless (start_disabled rescue false)%>
66
- startKSCapture();
67
- <%-else%>
67
+ <%-if (start_disabled rescue false)%>
68
68
  disableKSCapture();
69
+ <%-else%>
70
+ startKSCapture();
69
71
  <%-end%>
70
72
  </script>
@@ -81,7 +81,10 @@
81
81
  }
82
82
  }
83
83
 
84
- <%-unless (start_disabled rescue false)%>
84
+ <%-if (start_disabled rescue false)%>
85
+ // Do nothing, if start is disabled is true, don't print anything.
86
+ // If it's not defined, it must default to starting websocket()
87
+ <%-else%>
85
88
  startWS();
86
89
  <%-end%>
87
90
  </script>
@@ -1,3 +1,3 @@
1
1
  module ThecoreDataentryCommons
2
- VERSION = '1.2.38'.freeze
2
+ VERSION = '1.2.39'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_dataentry_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.38
4
+ version: 1.2.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni