thecore_dataentry_commons 1.4.9 → 2.0.3

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: 69be673cf75a0edb0b5ffc9b8b2388bfd4227e70bdecbe7c94d5c1a229013d8c
4
- data.tar.gz: 24d9b9cae23b01de0073c78cce3e2eda924d38db9cefd324b768065b8425453c
3
+ metadata.gz: 91e1f6e808b52413a27c198f715824b1682dca268561500c372521082bf75622
4
+ data.tar.gz: 2c4fb056c94e6132654b767c1516c9b6fcf812a8891053323ebce2aeed208f84
5
5
  SHA512:
6
- metadata.gz: '0385b1c20013adb0aab32119bacf53d0069728045d597c13f1f341485fa2540da46a63e01f3f4870e4a66bc98392d752dbe1a2d1ba8bff0e8fe2f46ceeeddeef'
7
- data.tar.gz: 223980eb810a422634455c13b9bbe80c6b3feed6a7d7f1aace8a16461db87d557d071a22c66aed17a44188995b3c4660858d425e8c764407bf09ce183def536c
6
+ metadata.gz: a5708ee95b72168579726d36a73236c9cf5b74f1f4a15cce5994072e1a91d40e33f1b42e85f115a9c5751b7ab606abf5698970145fc7aaf4b2ad472dea1dcc46
7
+ data.tar.gz: 0f06d9be28c8961240659e445f8f9d6a0e19ed5511184c30196d10d14a5ca7b35c1bac6977a796e1d9f954341b678805a21db41396913d44d7c09ce4be6e36fc
@@ -9,10 +9,11 @@
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
+ if (cleanBarcode) $("#barcode").empty();
16
17
  $("#data-info").empty().hide();
17
18
  $("#data-content").empty().hide();
18
19
  <%-unless (hide_action rescue true)%>
@@ -26,7 +26,7 @@ var dataAction = {
26
26
  code.prop('disabled', true);
27
27
  $(this).button('loading');
28
28
  this.before();
29
- $.get('<%=rails_admin.send("#{action_name}_path")%>', {
29
+ $.post('<%=rails_admin.send("#{action_name}_path")%>', {
30
30
  barcode: code.val(),
31
31
  parameters: additionalData,
32
32
  what_to_do: "data-action",
@@ -1 +1,9 @@
1
+ <script>
2
+ function resetCurrentBtn() {
3
+ $("#send").button('reset');
4
+ $("#barcode").prop('disabled', false);
5
+ $("#barcode").val('');
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.4.9'.freeze
2
+ VERSION = '2.0.3'.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.4.9
4
+ version: 2.0.3
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-16 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.