activeadmin_latlng 1.4.0 → 1.5.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35d27de2cf7400cccada2862027ee28908b856fd
|
4
|
+
data.tar.gz: 3df1e7d3e25b77fa7b7203558a15ecd1cc7410ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0500a29355e9fe01f5fb9fac85200453e8c8d01de27aa0ff837057ed90cc8fc8b4bc36be12f781e3c50ab274e2a180449bbdc59ecf8fda93ca12e2f7025e26e1
|
7
|
+
data.tar.gz: e850f7c5fdc2a8a056c4747a446ade164ca47afaa89e07fb26f91ec774c7e69064b8d2577dff0ea09c08767ddd1a9cac221510fdc52a1a8c1053d39bf58d800c
|
@@ -63,6 +63,13 @@
|
|
63
63
|
});
|
64
64
|
},
|
65
65
|
|
66
|
+
getCoordinates: function() {
|
67
|
+
return {
|
68
|
+
lat: parseFloat($("#" + osmObject.idLat).val()) || <%= default_lat %>,
|
69
|
+
lng: parseFloat($("#" + osmObject.idLng).val()) || <%= default_lng %>,
|
70
|
+
};
|
71
|
+
},
|
72
|
+
|
66
73
|
newLocation: function(item) {
|
67
74
|
$("#"+osmObject.idLat).val(item.lat);
|
68
75
|
$("#"+osmObject.idLng).val(item.lon);
|
@@ -88,7 +95,8 @@
|
|
88
95
|
}
|
89
96
|
|
90
97
|
$(document).ready(function () {
|
91
|
-
osmObject.
|
98
|
+
var coordinates = osmObject.getCoordinates();
|
99
|
+
osmObject.init(coordinates.lat, coordinates.lng);
|
92
100
|
});
|
93
101
|
</script>
|
94
102
|
<style>
|
@@ -96,12 +104,12 @@
|
|
96
104
|
height: 18px;
|
97
105
|
position: relative;
|
98
106
|
left: 52px;
|
99
|
-
top:
|
107
|
+
top: 44px;
|
100
108
|
max-width: 400px;
|
101
109
|
z-index: 2;
|
102
110
|
border-radius: 4px;
|
103
111
|
}
|
104
112
|
</style>
|
105
|
-
<input id="latlng-search-box" class="leaflet-bar" type="text" style="" placeholder="
|
113
|
+
<input id="latlng-search-box" class="leaflet-bar" type="text" style="" placeholder="Type address and hit enter...">
|
106
114
|
<div id="locationPicker" style="width: auto; height: <%= height %>px;"></div>
|
107
115
|
</li>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_latlng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Krylov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|