|
|
@@ -8,17 +8,6 @@ const variants_uris = {
|
|
|
const base_uri = variants_uris[$(location).attr('hostname')];
|
|
|
let apiGetUrl = base_uri + '/api/public/federation_structures?_format=json&page=1&itemsPerPage=99999';
|
|
|
|
|
|
-let structures_categories = {
|
|
|
- '1MC': 'Musique',
|
|
|
- '2TH': 'Théatre',
|
|
|
- '3DA': 'Dance',
|
|
|
- '5FA': 'Art du spectacle',
|
|
|
- 'OTAR': 'Arts de rue',
|
|
|
- 'OTCI': 'École de cirque',
|
|
|
- '6AR': 'Musée',
|
|
|
- '8CI': 'Cinéma',
|
|
|
- 'OTAU': 'Autres'
|
|
|
-}
|
|
|
|
|
|
// Converts numeric degrees to radians
|
|
|
function toRad(Value)
|
|
|
@@ -70,6 +59,25 @@ $(document).ready(function() {
|
|
|
let federationSelect = form.find("select[name='search-federation']").first();
|
|
|
let radiusSelect = form.find("select[name='search-radius']").first();
|
|
|
|
|
|
+ // Translations
|
|
|
+
|
|
|
+ let tr = {};
|
|
|
+ $('#labels').find('span').each(function (i, elt) {
|
|
|
+ tr[$(elt).attr('id')] = $(elt).text();
|
|
|
+ });
|
|
|
+
|
|
|
+ let structures_categories = {
|
|
|
+ '1MC': tr['1MC'],
|
|
|
+ '2TH': tr['2TH'],
|
|
|
+ '3DA': tr['3DA'],
|
|
|
+ '5FA': tr['5FA'],
|
|
|
+ 'OTAR':tr['OTAR'],
|
|
|
+ 'OTCI':tr['OTCI'],
|
|
|
+ '6AR': tr['6AR'],
|
|
|
+ '8CI': tr['8CI'],
|
|
|
+ 'OTAU':tr['OTAU'],
|
|
|
+ }
|
|
|
+
|
|
|
// #### Instanciate and populate leaflet map
|
|
|
let mapDiv = $('#structure-map').first();
|
|
|
let mapId = $(mapDiv).attr("id");
|
|
|
@@ -542,16 +550,16 @@ $(document).ready(function() {
|
|
|
if (navigator.geolocation) {
|
|
|
navigator.geolocation.getCurrentPosition(
|
|
|
function (geoloc) {
|
|
|
- setNewLocation('Autour de moi', geoloc.coords.longitude, geoloc.coords.latitude)
|
|
|
+ setNewLocation(tr['around-me'], geoloc.coords.longitude, geoloc.coords.latitude)
|
|
|
e.stopPropagation();
|
|
|
},
|
|
|
function () {
|
|
|
- alert("Erreur: La géolocalisation n'est pas disponible, vérifiez les permissions de votre navigateur");
|
|
|
+ alert(tr['geoloc-unavailable']);
|
|
|
}
|
|
|
);
|
|
|
e.stopPropagation();
|
|
|
} else {
|
|
|
- alert("La géolocalisation n'est pas disponible sur votre navigateur");
|
|
|
+ alert(tr['geoloc-unsupported']);
|
|
|
}
|
|
|
});
|
|
|
});
|