thecore_dataentry_commons 1.5.1 → 2.0.4

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
  SHA256:
3
- metadata.gz: 65eb716678710e1d57a445415278aba8d6acb8b6624323948bc149b31498dfa4
4
- data.tar.gz: 2b891743891630c866c7ecf8f6ec3a70f08988e0d5d39c41d46dcab3033f8cf6
3
+ metadata.gz: 88e291eed054bdeb0ffd1a476c87899e5d7464788efa6b11026acc37654f7626
4
+ data.tar.gz: 151548f725bc7e8bbf60489fea4d5312ddbe0be5b39153e677553f165a62c167
5
5
  SHA512:
6
- metadata.gz: dd004a8642ea0db62298d95bd8a0202b502631cd733b57232b679adc5ffb1e0b61cbfd82b21a96c0cad9d07202e44bf2b10d1c1f141e2483b0ee9540b89d48a3
7
- data.tar.gz: fb379939de72bdf7e01cf0bd0df79a4247209cb6df0661bbd48c5c1d56d1663ef13c75c4f3e93d31daecedd08b63de9780364205abc150f94a961e484c2f3762
6
+ metadata.gz: 78f838d79490d773742a7e022debda799dd554a5bad2a5ba6acb9b819a288248cba41a019a2eead813b06d10979e8c50b0ed590fe783313b384537a466299551
7
+ data.tar.gz: 793093646689e107ccf52c189d3dbd27817c70583bcdd193cb9685c1bbf5ca9ee46cb641c69631a3026e282b83ed66aa61251bdc0f86e80fc4155cc35ab3fd3d
@@ -9,10 +9,10 @@
9
9
  var returnedData;
10
10
  var additionalData = {};
11
11
  var disableKeyManagement = false;
12
+ var cleanBarcode = true;
12
13
 
13
14
  function resetInfo() {
14
15
  returnedData = code = undefined;
15
- $("#barcode").empty();
16
16
  $("#data-info").empty().hide();
17
17
  $("#data-content").empty().hide();
18
18
  <%-unless (hide_action rescue true)%>
@@ -1 +1,9 @@
1
+ <script>
2
+ function resetCurrentBtn() {
3
+ $("#send").button('reset');
4
+ $("#barcode").prop('disabled', false);
5
+ if (cleanBarcode) $("#barcode").empty();
6
+ // sendMessageToServer(msg_input_plugin_enable); clickedBtn = code = null;
7
+ }
8
+ </script>
1
9
  <%=render (@type.presence || "kp"), start_disabled: (start_disabled rescue false) %>
@@ -13,12 +13,6 @@
13
13
  // var clickedBtn; var code; Gestisco il keypress sull'input
14
14
  // $("#barcode").on(kpMode, keypressAndReturn);
15
15
 
16
- function resetCurrentBtn() {
17
- $("#send").button('reset');
18
- $("#barcode").prop('disabled', false);
19
- $("#barcode").val('');
20
- // sendMessageToServer(msg_input_plugin_enable); clickedBtn = code = null;
21
- }
22
16
  // var clickedBtn; var code; Gestisco il keypress sull'input
23
17
  function manageScannedKeystrokes(event) {
24
18
  const keycode = (event.keyCode ? event.keyCode : event.which);
@@ -0,0 +1,65 @@
1
+ <script>
2
+ function buildDTPicker(id, label, initialValue, ro, date_only){
3
+ var html = '<div class="input-group date" default-date="'+initialValue+'">';
4
+ html += '<label class="input-group-addon">'+label+'</label>';
5
+ html += '<input class="form-control" type="text" readonly/>';
6
+ html += '<label class="input-group-addon"><i class="fa fa-fw fa-calendar"></i></label>';
7
+ html += '</div>';
8
+ var jqueryObj = $(html);
9
+ var dtParams = {
10
+ locale: "<%=I18n.locale%>",
11
+ defaultDate: initialValue,
12
+ ignoreReadonly: !ro,
13
+ allowInputToggle: true,
14
+ sideBySide: true,
15
+ icons: {
16
+ time: 'fa fa-clock',
17
+ date: 'fa fa-calendar',
18
+ up: 'fa fa-chevron-up',
19
+ down: 'fa fa-chevron-down',
20
+ previous: 'fa fa-chevron-left',
21
+ next: 'fa fa-chevron-right',
22
+ today: 'fa fa-calendar-check',
23
+ clear: 'fa fa-trash',
24
+ close: 'fa fa-times'
25
+ }
26
+ }
27
+ if(date_only)
28
+ dtParams.format = "L";
29
+ jqueryObj.datetimepicker(dtParams).on('dp.change', function (e){
30
+ returnedData[id.replace(/-/g, '_')] = e.date.format();
31
+ $(this).datetimepicker('hide');
32
+ });
33
+ return jqueryObj;
34
+ }
35
+
36
+ function buildDatePicker(id, initialValue) {
37
+ var html = '<div class="input-group date" id="' + id + '">';
38
+ html += '<input type="text" class="form-control" />';
39
+ html += '<label class="input-group-addon"><i class="fa fa-fw fa-calendar"></i></label>';
40
+ html += '</div>';
41
+ var jqueryObj = $(html);
42
+ var dtParams = {
43
+ locale: "<%=I18n.locale%>",
44
+ defaultDate: initialValue,
45
+ allowInputToggle: true,
46
+ format: 'L',
47
+ icons: {
48
+ time: 'fa fa-clock',
49
+ date: 'fa fa-calendar',
50
+ up: 'fa fa-chevron-up',
51
+ down: 'fa fa-chevron-down',
52
+ previous: 'fa fa-chevron-left',
53
+ next: 'fa fa-chevron-right',
54
+ today: 'fa fa-calendar-check',
55
+ clear: 'fa fa-trash',
56
+ close: 'fa fa-times'
57
+ }
58
+ }
59
+ jqueryObj.datetimepicker(dtParams).on('dp.change', function (e){
60
+ $(this).datetimepicker('hide');
61
+ //returnedData[id.replace(/-/g, '_')] = e.date.format();
62
+ });
63
+ return jqueryObj;
64
+ }
65
+ </script>
@@ -1,6 +1,6 @@
1
- require "thecore_settings"
2
- require "thecore_dataentry_commons/engine"
1
+ require "thecore_ui_rails_admin"
3
2
  require "browser"
3
+ require "thecore_dataentry_commons/engine"
4
4
 
5
5
  module ThecoreDataentryCommons
6
6
  # Your code goes here...
@@ -1,3 +1,3 @@
1
1
  module ThecoreDataentryCommons
2
- VERSION = '1.5.1'.freeze
2
+ VERSION = '2.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_dataentry_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-18 00:00:00.000000000 Z
11
+ date: 2020-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: thecore_settings
14
+ name: thecore_ui_rails_admin
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.1'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: browser
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.5'
33
+ version: '4.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.5'
40
+ version: '4.1'
41
41
  description: This plugin adds some partials to deal with DataWedge WebSocket.
42
42
  email:
43
43
  - gabriele.tassoni@gmail.com
@@ -55,6 +55,7 @@ files:
55
55
  - app/views/rails_admin/main/_dataentry_commons_input_group_logic.html.erb
56
56
  - app/views/rails_admin/main/_kp.html.erb
57
57
  - app/views/rails_admin/main/_ws.html.erb
58
+ - app/views/thecore_utils/_html_helpers.html.erb
58
59
  - config/locales/en.thecore_datawedge_websocket_helpers.yml
59
60
  - config/locales/it.thecore_datawedge_websocket_helpers.yml
60
61
  - db/migrate/20170913192906_add_keymode_to_settings.rb
@@ -81,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  - !ruby/object:Gem::Version
82
83
  version: '0'
83
84
  requirements: []
84
- rubygems_version: 3.0.1
85
+ rubygems_version: 3.0.3
85
86
  signing_key:
86
87
  specification_version: 4
87
88
  summary: Some javascripts and partials to handle DW WS.