maestrano-connector-rails 2.0.2.pre.RC7 → 2.0.2.pre.RC8

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: bf0aeacbcf0ade3ddda62e58c84aef2f464e49af
4
- data.tar.gz: fc0deb05247177b49871feb5e35a24a2058e035a
3
+ metadata.gz: 037d652344e79e969e039b5965d77d60d8f37bf9
4
+ data.tar.gz: f2efcc1b388d1b79208b0785bebcac84a0583fa5
5
5
  SHA512:
6
- metadata.gz: abca8484da1b3604d0a78d53cdb172958e03bfc220bbd19d56f668cbbb2ada649484ed299f8578a30544b2c4467e9cff591eaacb973b67d4d6f5c6151a610a0d
7
- data.tar.gz: 713daa98e070d23f3a9ef15f183224b27310d95d9e295b8f3d6669c2a0acf993341591809ff57c9199161c23da2e43dc2ccdc703f5b56e69e91c556dd0f4d912
6
+ metadata.gz: 20063103324a253d004d6dde4ba740233ecacb552e43ca4e3f39fcadaed0977d238d4e8a34295460fdfd9c8c075b9d34e798d362a1210fbb50943bec0ebf6819
7
+ data.tar.gz: 640ab1729b3c3e4713faf6225e6c85c9737ffa74f1cf4db8582ab1c04c5f2ef370b7789e2c4b36957aa1b5eb3edfc243cac0eb23e44615dffb643cd683bbf6bc
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
- # Add dependencies to develop your gem here.
5
4
 
5
+ # Add dependencies to develop your gem here.
6
6
  group :development do
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
8
8
  gem 'sqlite3', platforms: :ruby
@@ -135,7 +135,7 @@ module Maestrano::Connector::Rails::Concerns::Entity
135
135
  true
136
136
  end
137
137
 
138
- def currency_check_field
138
+ def currency_check_fields
139
139
  nil
140
140
  end
141
141
 
@@ -266,12 +266,14 @@ module Maestrano::Connector::Rails::Concerns::Entity
266
266
  mapped_external_entities_with_idmaps.select! { |mapped_external_entity_with_idmap| !mapped_external_entity_with_idmap[:idmap].connec_id }
267
267
  end
268
268
 
269
- if self.class.currency_check_field
270
- mapped_external_entities_with_idmaps.each { |mapped_external_entity_with_idmap|
269
+ if self.class.currency_check_fields
270
+ mapped_external_entities_with_idmaps.each do |mapped_external_entity_with_idmap|
271
271
  id_map = mapped_external_entity_with_idmap[:idmap]
272
272
  next unless id_map&.metadata&.dig(:ignore_currency_update)
273
- mapped_external_entity_with_idmap[:entity].delete(self.class.currency_check_field)
274
- }
273
+ self.class.currency_check_fields.each do |field|
274
+ mapped_external_entity_with_idmap[:entity].delete(field)
275
+ end
276
+ end
275
277
  end
276
278
 
277
279
  proc = ->(mapped_external_entity_with_idmap) { batch_op('post', mapped_external_entity_with_idmap[:entity], nil, self.class.normalize_connec_entity_name(connec_entity_name)) }
@@ -2,6 +2,7 @@ function historicalDataDisplay()
2
2
  {
3
3
  if (document.getElementById('historical-data').checked)
4
4
  {
5
+ $('#myModal').modal('show');
5
6
  document.getElementById('historical-data-display-checked').style.display = 'block';
6
7
  document.getElementById('historical-data-display-unchecked').style.display = 'none';
7
8
  } else {
@@ -10,6 +11,25 @@ function historicalDataDisplay()
10
11
  }
11
12
  }
12
13
 
14
+ var checkHistorical
15
+
16
+ function closeModal(sender)
17
+ {
18
+ checkHistorical = sender.id == 'confirm'
19
+ $('#myModal').modal('hide');
20
+ }
21
+
22
+ $(document).ready(function(){
23
+ $("#myModal").on('hidden.bs.modal', function (e) {
24
+ if (!checkHistorical) {
25
+ document.getElementById('historical-data').checked = false
26
+ historicalDataDisplay()
27
+ }
28
+ checkHistorical = false
29
+ });
30
+ });
31
+
32
+
13
33
  $(function () {
14
34
  $('[data-toggle="tooltip"]').tooltip()
15
35
  })
@@ -55,7 +55,7 @@
55
55
  .col-md-1
56
56
  =image_tag "logos/to_external.png", class: "image"
57
57
  .col-md-4
58
- Vend wording
58
+ ApplicationName wording
59
59
  .col-md-3
60
60
  Universal wording
61
61
  .spacer1
@@ -85,6 +85,32 @@
85
85
  .col-md-4.col-md-offset-1
86
86
  %label{:for => 'historical-data'} Synchronize my historical data
87
87
  .col-md-1
88
+ #myModal.modal.fade{:role => "dialog"}
89
+ .modal-dialog
90
+ .modal-content
91
+ .modal-header
92
+ %button.close{"data-dismiss" => "modal", :type => "button"} ×
93
+ %h4.modal-title Warning!
94
+ .modal-body
95
+ %p
96
+ %b All data
97
+ created prior to the date you linked ApplicationName
98
+ %b will be synchronised both ways.
99
+ %p
100
+ It means that:
101
+ %br
102
+ \- all data from applications you already have linked to the platform will be sent to your ApplicationName account
103
+ %br
104
+ \- all exisiting data from ApplicationName will be sent to your other applications
105
+ %br
106
+ %p
107
+ If you have been manually copying records in multiple applications,
108
+ %b you risk seeing duplicates arising!
109
+ %p
110
+ %b This action cannot be undone at any time!
111
+ .modal-footer
112
+ %button.btn.btn-primary{id: 'confirm', :type => "button", onclick: "closeModal(confirm);"} Confirm
113
+ %button.btn.btn-secondary{id: 'close', :type => "button", onclick: "closeModal(close);"} Close
88
114
  %input{type: 'checkbox', id: 'historical-data', name: 'historical-data', checked: current_organization.historical_data, onchange: 'historicalDataDisplay();', disabled: current_organization.historical_data}
89
115
  .col-md-6
90
116
  %small#historical-data-display-unchecked{style: "display: #{current_organization.historical_data ? 'none' : 'block'}"} Only data created after #{(current_organization.date_filtering_limit && current_organization.date_filtering_limit.utc || Time.now.utc).to_formatted_s(:long_ordinal)} will be synchronized
@@ -1,7 +1,7 @@
1
1
  module Maestrano
2
2
  module Connector
3
3
  module Rails
4
- VERSION = '2.0.2.pre.RC7'.freeze
4
+ VERSION = '2.0.2.pre.RC8'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maestrano-connector-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2.pre.RC7
4
+ version: 2.0.2.pre.RC8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maestrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -490,7 +490,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
490
490
  version: 1.3.1
491
491
  requirements: []
492
492
  rubyforge_project:
493
- rubygems_version: 2.6.8
493
+ rubygems_version: 2.5.1
494
494
  signing_key:
495
495
  specification_version: 4
496
496
  summary: Rails framework to build connector with Maestrano