rails_admin_map 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 871632eda5b92aaa6f84e97a76c305ff9f99b038255e617174cbe95320719ec7
|
4
|
+
data.tar.gz: 2c69064be8b05ec05e261193777072f0d2c39bd8640f218334e586d16d2ec164
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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>
|
@@ -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
|
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:
|
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
|
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.
|
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-
|
12
|
+
date: 2018-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|