Le preview présente mieux la carte OSM
This commit is contained in:
parent
4471ffd215
commit
2c784f0367
@ -15,7 +15,7 @@ $(document).ready ->
|
|||||||
).addTo map
|
).addTo map
|
||||||
|
|
||||||
|
|
||||||
$('.events #map').each ->
|
$('.events #map, .moderations #map').each ->
|
||||||
coord = [$(this).attr('latitude'), $(this).attr('longitude')]
|
coord = [$(this).attr('latitude'), $(this).attr('longitude')]
|
||||||
|
|
||||||
map = L.map('map').setView [coord[0], coord[1]], 16
|
map = L.map('map').setView [coord[0], coord[1]], 16
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
.maps #map
|
.maps #map
|
||||||
height: 60em
|
height: 60em
|
||||||
|
|
||||||
.events #map
|
.events #map, .moderations #map
|
||||||
height: 20em
|
height: 20em
|
||||||
|
@ -57,6 +57,13 @@ class Event < ActiveRecord::Base
|
|||||||
self.submitter = contact if submitter.empty?
|
self.submitter = contact if submitter.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
before_validation on: :update do
|
||||||
|
if address_changed?
|
||||||
|
self.latitude = nil
|
||||||
|
self.longitude = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
before_create do
|
before_create do
|
||||||
self.secret = SecureRandom.urlsafe_base64(32)[0...32]
|
self.secret = SecureRandom.urlsafe_base64(32)[0...32]
|
||||||
self.moderator_mail_id = SecureRandom.urlsafe_base64(32)[0...32]
|
self.moderator_mail_id = SecureRandom.urlsafe_base64(32)[0...32]
|
||||||
|
Loading…
Reference in New Issue
Block a user