thecore_dataentry_commons 1.5.2 → 2.0.5

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: 2442f0cb3692d358219de8b206860f4ea4f5cade04255c47d8a5a8a9828237a5
4
- data.tar.gz: 3ef6cf83a6f6007035593eda847ac3dd1d08cd5bfe0359b1ba82ba89539c1e1a
3
+ metadata.gz: 140f6c75984627fe814a919ee45ae4facfc75a35eed04be189ae93ceec1c8e17
4
+ data.tar.gz: b395e85fbb57dba18e2eb911ebb48115c88e7ab5d6504b66ab6b7837b265e178
5
5
  SHA512:
6
- metadata.gz: 5900df3cc036d7b420bc57bb5476866551c6cddfe88b10ad3340d4670641b1c1d1f2dea7a35ade9596b7ad40cb87e1699d0609278b6996d7296f5a6aae2b7e19
7
- data.tar.gz: 40c910cf34906218f30248d47988108bac12f48c169098d50bb4b88ea0087b7cae7f8c2afbe36b20caa7bebb339fc55a3bfbb865fb5b8a978665db84cdd3134b
6
+ metadata.gz: b311678f7e1a0fc695d5c4e536a5f8a426afb912e155a3a13b69ba9e13f509e0d330be7e5722dd178b838b5e165392ba00f5597c554f6ac4a92dd1d99a4c83e3
7
+ data.tar.gz: 0725e8e36af25144087d939b75fa919f38326d870408eff03fb4a487e5a78d1b7f9f3f336c2a0595877cfcece3e726787747831da067068b63813bd7e3766e8c
@@ -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)%>
@@ -2,7 +2,7 @@
2
2
  function resetCurrentBtn() {
3
3
  $("#send").button('reset');
4
4
  $("#barcode").prop('disabled', false);
5
- $("#barcode").val('');
5
+ if (cleanBarcode) $("#barcode").empty();
6
6
  // sendMessageToServer(msg_input_plugin_enable); clickedBtn = code = null;
7
7
  }
8
8
  </script>
@@ -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.2'.freeze
2
+ VERSION = "#{`git describe --tags $(git rev-list --tags --max-count=1)`}"
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.2
4
+ version: 2.0.5
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-10-01 00:00:00.000000000 Z
11
+ date: 2020-11-03 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.6
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.