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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a17fdea7f586d62408848b4b405d3a16d8edac61
4
- data.tar.gz: d99b0798a8fe8b954282e5b258d0bd84619d326f
3
+ metadata.gz: 23fee281a5f858084b4cca7d8fda4d87e9245fd1
4
+ data.tar.gz: 44f11e3322ada48b613003b76abf8562d6b1b12d
5
5
  SHA512:
6
- metadata.gz: 458137d6fec25a0c88404e5b88f8e13fb5a0cdca1a18e95f2c786bcfb6cb8d0ff11ad5d4a3c7f43a595e98dfa3b999c6daded8cc969d367096d4c1af1843177c
7
- data.tar.gz: f1f8b9f2e9a25ddc7d2dfe2716958613c50b36e0175b075e16c11a30b248503fc717908295bb3a34ffa3aee95a29999efb91e8b6ac902e91816b274f258a4570
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
- input.scrivito('save', place.formatted_address)
33
+ scrivitoAddressField.scrivito('save', place.formatted_address)
32
34
  )
33
35
  else
34
36
  widgets.html('Google API is not initialized')
@@ -3,7 +3,8 @@
3
3
  border: 1px solid transparent;
4
4
  border-radius: 2px 0 0 2px;
5
5
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
6
- margin-top: 16px;
6
+ margin-top: 10px;
7
+ min-height: 28px;
7
8
  padding: 0 11px 0 13px;
8
9
  outline: none;
9
10
  text-overflow: ellipsis;
@@ -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
- <%= scrivito_tag(:input, widget, :address, type: 'text') %>
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
- <%= scrivito_tag(:input, widget, :address, type: 'text') %>
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>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoGoogleMapsWidget
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.12'
3
3
  end
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.11
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: 2017-04-27 00:00:00.000000000 Z
11
+ date: 2018-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: scrivito_sdk