scrivito_google_maps_widget 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/scrivito_google_maps_widget/editing.js.coffee +4 -2
- data/app/assets/stylesheets/scrivito_google_maps_widget/editing.css +2 -1
- data/app/views/google_maps_widget/details.html.erb +2 -1
- data/app/views/google_maps_widget/show.html.erb +2 -1
- data/lib/scrivito_google_maps_widget/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23fee281a5f858084b4cca7d8fda4d87e9245fd1
|
4
|
+
data.tar.gz: 44f11e3322ada48b613003b76abf8562d6b1b12d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb7ef473071bb29103ff6cdf2ff1107088c726ede76056a1e80657fe4b58c25008767956a9d5452d0e586ea23ed9b711f5a0ed04c8151ba222a553ac01b14f1a
|
7
|
+
data.tar.gz: cc3d4f04940bd3457c11bda57cded8e01abf6331179eafb8477807e92750b9d868259cb16a8f137234b5b7659a6e4207cd85e198ead8e9ddde71fe5ad3263a6e
|
@@ -14,7 +14,7 @@ $ ->
|
|
14
14
|
infoWindow = canvas.data('infoWindow')
|
15
15
|
marker = canvas.data('marker')
|
16
16
|
|
17
|
-
input = widget.find('input')
|
17
|
+
input = widget.find('input.address-input')
|
18
18
|
input.show()
|
19
19
|
|
20
20
|
content = canvas.attr('data-location')
|
@@ -25,10 +25,12 @@ $ ->
|
|
25
25
|
autocomplete = new google.maps.places.Autocomplete(input[0])
|
26
26
|
autocomplete.bindTo('bounds', map)
|
27
27
|
|
28
|
+
scrivitoAddressField = widget.find('.scrivito-address-field')
|
29
|
+
|
28
30
|
google.maps.event.addListener(autocomplete, 'place_changed', ->
|
29
31
|
place = autocomplete.getPlace()
|
30
32
|
googleMapsWidget.placeMarker(map, infoWindow, marker, place)
|
31
|
-
|
33
|
+
scrivitoAddressField.scrivito('save', place.formatted_address)
|
32
34
|
)
|
33
35
|
else
|
34
36
|
widgets.html('Google API is not initialized')
|
@@ -9,7 +9,8 @@
|
|
9
9
|
<%= scrivito_details_for t('scrivito_google_maps_widget.details.address', default: 'Address') do %>
|
10
10
|
<div class="google-maps" style="height: 320px">
|
11
11
|
<% if scrivito_in_editable_view? %>
|
12
|
-
|
12
|
+
<input type="text" class="address-input"></input>
|
13
|
+
<%= scrivito_tag(:div, widget, :address, class: 'scrivito-address-field hidden') %>
|
13
14
|
<% end %>
|
14
15
|
|
15
16
|
<div class="map" data-zoom="<%= widget.zoom_level %>" data-location="<%= widget.address %>"></div>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<div class="google-maps" style="height: <%= widget.height %>">
|
2
2
|
<% if scrivito_in_editable_view? %>
|
3
|
-
|
3
|
+
<input type="text" class="address-input"></input>
|
4
|
+
<%= scrivito_tag(:div, widget, :address, class: 'scrivito-address-field hidden') %>
|
4
5
|
<% end %>
|
5
6
|
|
6
7
|
<div class="map" data-zoom="<%= widget.zoom_level %>" data-location="<%= widget.address %>"></div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_google_maps_widget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: scrivito_sdk
|