rails_admin_map 1.0.3 → 1.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: 844e4b28a8d480d24d94199138fa0a6fa4dc57f15f3c003b8da603cba5c38508
4
- data.tar.gz: baf4f8822b071af44b44e9f0527ddb50a9fe843c6b4059f85d73a6b9377ab4a2
3
+ metadata.gz: 871632eda5b92aaa6f84e97a76c305ff9f99b038255e617174cbe95320719ec7
4
+ data.tar.gz: 2c69064be8b05ec05e261193777072f0d2c39bd8640f218334e586d16d2ec164
5
5
  SHA512:
6
- metadata.gz: f0a1fc7332e57525be8ccc670a1f6cca9c235d49b6ca20719562351fb31693529160b023e41bc139e1de51edced5531af5d9c4aa8510b2bd83ab4b9b8730fe13
7
- data.tar.gz: 152db7b93b7a1f2d8329a343000f5e1167a62f899116e6510345d1685566dbe6dca130f70f4de5b7a364727819ca0798c089546b19c9aa9f56eaeb71964d94d6
6
+ metadata.gz: 5f8b98215b059b3beb39d08f72085d6279881952dd9b40630655350ec8840a71e684dae193393003779ece58c626baa7ebdbb1005820f0dbf447b246901bd596
7
+ data.tar.gz: a628c223bef771e73a0307a948c9f3d08c1c48fd29de0fc9e5bfa8107b1b07fd428355cfd97735efe7a7dc82256c19e960ac5ce434b5cf7a0c6ee655755e66ff
@@ -1,6 +1,10 @@
1
+ <script type="text/javascript">
2
+ window.google_api_key = "<%= Rails.application.config.map_api_key %>"
3
+ </script>
1
4
  <%= javascript_include_tag 'rails_admin/select2', 'rails_admin/rails_admin_map' %>
2
5
  <%= stylesheet_link_tag 'rails_admin/rails_admin_map' %>
3
6
 
7
+
4
8
  <div class="rails-admin-map__wrapper js-map-wrap <%= @object.latitude.present? && @object.longitude.present? ? 'active' : '' %>">
5
9
  <button type="button" class="rails-admin-map__remove-btn js-remove">Retirer</button>
6
10
  <span class="rails-admin-map__overlay js-map-overlay"><span class="rails-admin-map__overlay-label">Cliquer pour ajouter</span></span>
@@ -1,3 +1,3 @@
1
1
  module RailsAdminMap
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
@@ -112,7 +112,7 @@ googleMapsCoordinatesInputs = (function() {
112
112
 
113
113
  googleMapsCoordinatesInputs.prototype.ajaxCallToUpdateCity = function(value) {
114
114
  var api, request;
115
- api = 'https://maps.googleapis.com/maps/api/geocode/json?key=<%= Rails.application.config.map_api_key %>&address=';
115
+ api = 'https://maps.googleapis.com/maps/api/geocode/json?key='+window.google_api_key+'&address=';
116
116
  request = $.ajax({
117
117
  url: api + value,
118
118
  method: 'POST',
@@ -152,7 +152,7 @@ googleMapsCoordinatesInputs = (function() {
152
152
  dataType: 'json',
153
153
  delay: 250,
154
154
  data: function (params) {
155
- return { address: params.term, key: "<%= Rails.application.config.map_api_key %>" };
155
+ return { address: params.term, key: window.google_api_key };
156
156
  },
157
157
  processResults: function (data) {
158
158
  locations = [];
@@ -202,7 +202,7 @@ if (typeof google === 'object' && typeof google.maps === 'object') {
202
202
  } else {
203
203
  var script = document.createElement("script");
204
204
  script.type = "text/javascript";
205
- script.src = "//maps.google.com/maps/api/js?key=<%= Rails.application.config.map_api_key %>&sensor=false&callback=initMap";
205
+ script.src = "//maps.google.com/maps/api/js?key="+window.google_api_key+"&sensor=false&callback=initMap";
206
206
  document.body.appendChild(script);
207
207
  }
208
208
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis-Philippe Dumas
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-11-08 00:00:00.000000000 Z
12
+ date: 2018-11-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails